From 4b76686ee6c9b041091897fccba8cc6bbf744bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20M=C3=A9nager?= <herve.menager@pasteur.fr> Date: Sat, 12 Sep 2020 21:15:57 +0200 Subject: [PATCH] fix ligand type parsed from yaml in contrib E2E tests --- ippisite/ippidb/tests/tests_contribute_e2e.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ippisite/ippidb/tests/tests_contribute_e2e.py b/ippisite/ippidb/tests/tests_contribute_e2e.py index c6c0058f..31342c88 100644 --- a/ippisite/ippidb/tests/tests_contribute_e2e.py +++ b/ippisite/ippidb/tests/tests_contribute_e2e.py @@ -578,7 +578,10 @@ class ContributionE2ETestCase(TestCase): comp = models.Compound.objects.get(iupac_name=c["molecule_iupac"]) # test ligand ID has been stored if the X ray data option is checked if entry_data.get("xray", False) is True: - self.assertEqual(comp.ligand_id, c.get("ligand_id", None)) + ligand_id = c.get("ligand_id", None) + if ligand_id is not None: + ligand_id = str(ligand_id) + self.assertEqual(comp.ligand_id, ligand_id) # test activity bibliography = models.Bibliography.objects.get( id_source=entry_data["id_source"].strip() -- GitLab