Skip to content

Commit

Permalink
Merge pull request #1415 from CartoDB/fix/catalog-provider-geo-filter
Browse files Browse the repository at this point in the history
Geographies filtered by provider
  • Loading branch information
Jesus89 committed Dec 30, 2019
2 parents d0ebaf5 + 6afbba7 commit 9a4935d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from cartoframes.auth import Credentials

from .constants import COUNTRY_FILTER, CATEGORY_FILTER
from .constants import COUNTRY_FILTER, CATEGORY_FILTER, PROVIDER_FILTER
from .entity_repo import EntityRepository

from .....io.carto import read_carto


_GEOGRAPHY_ID_FIELD = 'id'
_GEOGRAPHY_SLUG_FIELD = 'slug'
_ALLOWED_FILTERS = [COUNTRY_FILTER, CATEGORY_FILTER]
_ALLOWED_FILTERS = [COUNTRY_FILTER, CATEGORY_FILTER, PROVIDER_FILTER]

_DO_CREDENTIALS = Credentials('do-metadata', 'default_public')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ def test_get_all_only_uses_allowed_filters(self, mocked_repo):
# Then
mocked_repo.assert_called_once_with({
'country_id': 'usa',
'category_id': 'demographics'
'category_id': 'demographics',
'provider_id': 'open_data'
})
assert geographies == test_geographies

Expand Down

0 comments on commit 9a4935d

Please sign in to comment.