Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using CARTOframes for downloading geometry table #1663

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def _get_filtered_entities(self, filters):
rows = self._get_rows(cleaned_filters)

if len(rows) == 0:
return None
return CatalogList([])

normalized_data = [self._get_entity_class()(self._map_row(row)) for row in rows]
return CatalogList(normalized_data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_get_all_when_empty(self, mocked_repo):

# Then
mocked_repo.assert_called_once_with(None)
assert categories is None
assert categories == []

@patch.object(RepoClient, 'get_categories')
def test_get_all_only_uses_allowed_filters(self, mocked_repo):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_get_all_when_empty(self, mocked_repo):
countries = repo.get_all()

# Then
assert countries is None
assert countries == []

@patch.object(RepoClient, 'get_countries')
def test_get_all_only_uses_allowed_filters(self, mocked_repo):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_get_all_when_empty(self, mocked_repo):

# Then
mocked_repo.assert_called_once_with(None)
assert datasets is None
assert datasets == []

@patch.object(RepoClient, 'get_datasets')
def test_get_all_only_uses_allowed_filters(self, mocked_repo):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_get_all_when_empty(self, mocked_repo):

# Then
mocked_repo.assert_called_once_with(None)
assert geographies is None
assert geographies == []

@patch.object(RepoClient, 'get_geographies')
def test_get_all_only_uses_allowed_filters(self, mocked_repo):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_get_all_when_empty(self, mocked_repo):

# Then
mocked_repo.assert_called_once_with(None)
assert providers is None
assert providers == []

@patch.object(RepoClient, 'get_providers')
def test_get_all_only_uses_allowed_filters(self, mocked_repo):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_get_all_when_empty(self, mocked_repo):

# Then
mocked_repo.assert_called_once_with(None)
assert variables_groups is None
assert variables_groups == []

@patch.object(RepoClient, 'get_variables_groups')
def test_get_all_only_uses_allowed_filters(self, mocked_repo):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_get_all_when_empty(self, mocked_repo):

# Then
mocked_repo.assert_called_once_with(None)
assert variables is None
assert variables == []

@patch.object(RepoClient, 'get_variables')
def test_get_all_only_uses_allowed_filters(self, mocked_repo):
Expand Down