Skip to content

Commit

Permalink
Update pyramid_skosprovider. (#578)
Browse files Browse the repository at this point in the history
Closes-Issue: #499
  • Loading branch information
Wim-De-Clercq committed Jul 13, 2020
1 parent 57821db commit 70278c8
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/test_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,32 @@ def test_crud_no_skos_provider(self):
self.assertTrue('message' in res)
self.assertTrue('No SKOS registry found, please check your application setup' in res)

def test_match_filter(self):
response = self.testapp.get(
'/conceptschemes/TREES/c',
headers={'Accept': 'application/json'}
)
self.assertEqual(200, response.status_code)
self.assertEqual(3, len(response.json))
response = self.testapp.get(
'/conceptschemes/TREES/c'
'?match=http://id.python.org/different/types/of/trees/nr/1/the/larch',
headers={'Accept': 'application/json'}
)
self.assertEqual(200, response.status_code)
self.assertEqual(
[
{
'id': 1,
'uri': 'urn:x-skosprovider:trees/1',
'type': 'concept',
'label': 'De Lariks',
'@context': 'http://localhost/jsonld/context/skos'
}
],
response.json
)


class CacheFunctionalTests(FunctionalTests):
def _get_default_headers(self):
Expand Down

0 comments on commit 70278c8

Please sign in to comment.