Example #1
0
    def test_synonym_properties(self, mock_json_retriever):
        mock_json_retriever.return_value = [
         {"name": "DU-29,373", "refs": []},
         {"name": "(+)-flesinoxan", "refs": []}
        ]
        ligand = Ligand(self.ligand_json)

        self.assertEqual(ligand.synonyms(), ["DU-29,373", "(+)-flesinoxan"])
Example #2
0
    def test_synonym_properties(self, mock_json_retriever):
        mock_json_retriever.return_value = [{
            "name": "DU-29,373",
            "refs": []
        }, {
            "name": "(+)-flesinoxan",
            "refs": []
        }]
        ligand = Ligand(self.ligand_json)

        self.assertEqual(ligand.synonyms(),
                         ["DU-29,373", "(+)-flesinoxan"])
Example #3
0
    def test_synonym_properties_when_no_json(self, mock_json_retriever):
        mock_json_retriever.return_value = None
        ligand = Ligand(self.ligand_json)

        self.assertEqual(ligand.synonyms(), [])
Example #4
0
    def test_synonym_properties_when_no_json(self, mock_json_retriever):
        mock_json_retriever.return_value = None
        ligand = Ligand(self.ligand_json)

        self.assertEqual(ligand.synonyms(), [])