Skip to content
Snippets Groups Projects
Commit ccc2629a authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

Allow to have two proteins with the same gene_name and distinct uniprot_id

parent 245c12fd
No related branches found
No related tags found
No related merge requests found
Pipeline #12969 canceled
......@@ -10,7 +10,7 @@ from django.urls import reverse
from django.contrib.auth import get_user_model
from openbabel import vectorUnsignedInt, OBFingerprint
from ippidb import ws
from ippidb import ws, models
from ippidb.ws import get_uniprot_info
from .models import Compound, CompoundTanimoto, create_tanimoto, update_compound_cached_properties, Symmetry
from .models import DrugBankCompound
......@@ -633,3 +633,10 @@ class TestConvertIUPACToSMILESAndMore(TestCase):
def test_invalide_entry(self):
self.assertRaises(ws.EntryNotFoundError, ws.convert_iupac_to_smiles_and_inchi, '3-{1-oxo-6-[4-(piperid')
self.assertRaises(ws.EntryNotFoundError, ws.convert_iupac_to_smiles_and_inchi, None)
class DuplicateGeneNameTestCase(TestCase):
def test_works(self):
models.Protein.objects.get_or_create(uniprot_id='P12497')
models.Protein.objects.get_or_create(uniprot_id='P0C6F2')
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment