summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-api/opendc/api/v2/projects/test_endpoint.py
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-web/opendc-web-api/opendc/api/v2/projects/test_endpoint.py')
-rw-r--r--opendc-web/opendc-web-api/opendc/api/v2/projects/test_endpoint.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/opendc-web/opendc-web-api/opendc/api/v2/projects/test_endpoint.py b/opendc-web/opendc-web-api/opendc/api/v2/projects/test_endpoint.py
index 9444b1e4..db768f28 100644
--- a/opendc-web/opendc-web-api/opendc/api/v2/projects/test_endpoint.py
+++ b/opendc-web/opendc-web-api/opendc/api/v2/projects/test_endpoint.py
@@ -3,6 +3,13 @@ from opendc.util.database import DB
test_id = 24 * '1'
+def test_get_user_projects(client, mocker):
+ mocker.patch.object(DB, 'fetch_all', return_value={'_id': test_id, 'authorizations': [{'userId': 'test',
+ 'authorizationLevel': 'OWN'}]})
+ res = client.get('/v2/projects')
+ assert '200' in res.status
+
+
def test_add_project_missing_parameter(client):
assert '400' in client.post('/v2/projects').status