def test_query_pokeapi_success(self): query = '/api/v1/pokemon/mew/' result = query_pokeapi(query) self.assertIsNotNone(result) self.assertEquals(result['name'], 'Mew')
def test_query_pokeapi_fails(self): fail_query = '/api/v1/pokemon/error/' result = query_pokeapi(fail_query) self.assertIsNone(result)