File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 11import pytest
22from pyenzyme .fetcher .chebi import fetch_chebi
3+ from pyenzyme .fetcher .pdb import fetch_pdb
34from pyenzyme .fetcher .pubchem import fetch_pubchem
45from pyenzyme .fetcher .rhea import fetch_rhea
56from pyenzyme .fetcher .uniprot import fetch_uniprot
@@ -116,3 +117,20 @@ def test_fetch_pubchem_to_small_molecule(self):
116117 def test_fetch_pubchem_to_small_molecule_invalid_id (self ):
117118 with pytest .raises (ValueError ):
118119 fetch_pubchem (cid = 162176127617627 )
120+
121+ def test_fetch_pdb_to_protein (self ):
122+ protein = fetch_pdb ("1a23" )
123+ assert protein is not None
124+ assert protein .id == "1a23_1"
125+ assert (
126+ protein .name
127+ == "SOLUTION NMR STRUCTURE OF REDUCED DSBA FROM ESCHERICHIA COLI, MINIMIZED AVERAGE STRUCTURE"
128+ )
129+ assert (
130+ protein .sequence
131+ == "AQYEDGKQYTTLEKPVAGAPQVLEFFSFFCPHCYQFEEVLHISDNVKKKLPEGVKMTKYHVNFMGGDLGKDLTQAWAVAMALGVEDKVTVPLFEGVQKTQTIRSASDIRDVFINAGIKGEEYDAAWNSFVVKSLVAQQEKAAADVQLRGVPAMFVNGKYQLNPQGMDTSNMDVFVQQYADTVKYLSEKK"
132+ )
133+
134+ def test_fetch_pdb_to_protein_invalid_id (self ):
135+ with pytest .raises (ValueError ):
136+ fetch_pdb ("INVALID_ID" )
You can’t perform that action at this time.
0 commit comments