summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_pydrilla.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/test/test_pydrilla.py b/src/test/test_pydrilla.py
index 89b499f..9ec6ba6 100644
--- a/src/test/test_pydrilla.py
+++ b/src/test/test_pydrilla.py
@@ -75,12 +75,22 @@ def test_api_basic(client):
response = client.get('/licenses/CC0-1.0')
definition = json.loads(response.data.decode())
- assert definition['long_name'] == 'Creative Commons Zero v1.0 Universal'
+ assert definition['type'] == 'license'
+ assert definition['long_name'] == 'Creative Commons Zero v1.0 Universal'
assert definition['source_name'] == 'hello'
response = client.get('/licenses/random-bad-identifier')
assert response.status_code == 404
+ response = client.get('/sources/hello')
+ definition = json.loads(response.data.decode())
+
+ assert definition['source_name'] == 'hello'
+ assert type(definition['schema_version']) is list
+
+ response = client.get('/sources/random-bad-identifier')
+ assert response.status_code == 404
+
def test_normalize_version():
assert pydrilla.normalize_version([4, 5, 3, 0, 0]) == [4, 5, 3]
assert pydrilla.normalize_version([1, 0, 5, 0]) == [1, 0, 5]