def test_should_return_valid_go_ontology_graph(self, mock_search, mock_redis): mock_search.side_effect = go_side_effect go_obj = factory.GoFactory() request = testing.DummyRequest() request.context = testing.DummyResource() id = mock_redis.extract_id_request(request, 'go', param_name='id') response = go_ontology_graph(request) self.assertEqual(response, go_obj.ontology_graph())
def test_should_return_valid_go_locus_details_all(self, mock_search, mock_redis): mock_search.side_effect = go_side_effect go_obj = factory.GoFactory() request = testing.DummyRequest() request.context = testing.DummyResource() id = mock_redis.extract_id_request(request, 'go', param_name='id') response = go_locus_details_all(request) self.assertEqual(response, go_obj.annotations_and_children_to_dict())
def test_should_return_valid_go(self, mock_search, mock_redis): mock_search.side_effect = go_side_effect go_obj = factory.GoFactory() request = testing.DummyRequest() request.context = testing.DummyResource() format_name = mock_redis.extract_id_request(request, 'go', param_name='format_name') response = go(request) self.assertEqual(response, go_obj.to_dict())