def test_can_get_interactions(self, mock_json_retriever): mock_json_retriever.return_value = [self.interaction_json, self.interaction_json] ligand = Ligand(self.ligand_json) interactions = ligand.interactions() self.assertIsInstance(interactions, list) self.assertEqual(len(interactions), 2) for interaction in interactions: self.assertIsInstance(interaction, Interaction)
def test_can_get_interactions(self, mock_json_retriever): mock_json_retriever.return_value = [ self.interaction_json, self.interaction_json ] ligand = Ligand(self.ligand_json) interactions = ligand.interactions() self.assertIsInstance(interactions, list) self.assertEqual(len(interactions), 2) for interaction in interactions: self.assertIsInstance(interaction, Interaction)
def test_interactions_when_no_json(self, mock_json_retriever): mock_json_retriever.return_value = None ligand = Ligand(self.ligand_json) self.assertEqual(ligand.interactions(), [])
def test_interactions_when_no_json(self, mock_json_retriever): mock_json_retriever.return_value = None ligand = Ligand(self.ligand_json) self.assertEqual(ligand.interactions(), [])