Skip to content

Commit

Permalink
Merge pull request #475 from geoadmin/develop
Browse files Browse the repository at this point in the history
New Release v1.28.1 - #patch
  • Loading branch information
sami-nouidri-swisstopo authored Nov 26, 2024
2 parents 9aa5625 + 33e73a5 commit 57722c9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions app/tests/tests_10/test_collections_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,26 @@ def test_single_collection_endpoint(self):

self.check_stac_collection(self.collection_1.json, response_json)

def test_filtering_by_provider(self):
collection_with_provider = self.factory.create_sample(
sample='collection-1',
name='collection-provider',
providers=[{
'name': 'test-provider'
}],
db_create=True
)

response = self.client.get(f"/{STAC_BASE_V}/collections?provider=test-provider")
response_json = response.json()
self.assertStatusCode(200, response)

self.assertEqual(
len(response_json['collections']),
1,
msg=f"Only one collection should be returned. Response: {response_json}"
)

@mock_s3_asset_file
def test_single_collection_assets_endpoint(self):
asset_count = 3
Expand Down

0 comments on commit 57722c9

Please sign in to comment.