def test_get_geographies_slug_list(self, fetch_entity_mock): repo = RepoClient() filters = {'slug': ['slug_1', 'slug_2']} repo.get_geographies(filters) fetch_entity_mock.assert_any_call('geographies/slug_1') fetch_entity_mock.assert_any_call('geographies/slug_2')
def test_get_geographies_with_id_list(self, fetch_entity_mock): repo = RepoClient() filters = {'id': ['id_1', 'id_2']} repo.get_geographies(filters) fetch_entity_mock.assert_any_call('geographies/id_1') fetch_entity_mock.assert_any_call('geographies/id_2')
def test_get_geographies_with_slug(self, fetch_entity_mock): repo = RepoClient() filters = {'slug': 'slug_1'} repo.get_geographies(filters) fetch_entity_mock.assert_called_once_with('geographies/slug_1')
def test_get_geographies_with_filters(self, fetch_entity_mock): repo = RepoClient() filters = {'key': 'value'} repo.get_geographies(filters) fetch_entity_mock.assert_called_once_with('geographies', filters)