summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-07-17 10:07:42 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:48:07 +0200
commit4fa2e0dd8e2148c715b2ce691ea471d5af9a9cdb (patch)
treed42e890a9fc6c7411e20cc8638d03afdfef320b8 /api
parentfc5405bab041545f4b7f04faa22fb21cc84f5c43 (diff)
Fix tests
Diffstat (limited to 'api')
-rw-r--r--api/opendc/api/v2/scenarios/scenarioId/test_endpoint.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/api/opendc/api/v2/scenarios/scenarioId/test_endpoint.py b/api/opendc/api/v2/scenarios/scenarioId/test_endpoint.py
index 09b7d0c0..c3be0215 100644
--- a/api/opendc/api/v2/scenarios/scenarioId/test_endpoint.py
+++ b/api/opendc/api/v2/scenarios/scenarioId/test_endpoint.py
@@ -19,6 +19,7 @@ def test_get_scenario_not_authorized(client, mocker):
mocker.patch.object(DB,
'fetch_one',
return_value={
+ 'projectId': '1',
'portfolioId': '1',
'_id': '1',
'authorizations': [{
@@ -34,6 +35,7 @@ def test_get_scenario(client, mocker):
mocker.patch.object(DB,
'fetch_one',
return_value={
+ 'projectId': '1',
'portfolioId': '1',
'_id': '1',
'authorizations': [{
@@ -63,6 +65,7 @@ def test_update_scenario_not_authorized(client, mocker):
'fetch_one',
return_value={
'_id': '1',
+ 'projectId': '1',
'portfolioId': '1',
'authorizations': [{
'projectId': '1',
@@ -82,6 +85,7 @@ def test_update_scenario(client, mocker):
'fetch_one',
return_value={
'_id': '1',
+ 'projectId': '1',
'portfolioId': '1',
'authorizations': [{
'projectId': '1',
@@ -110,6 +114,7 @@ def test_delete_project_different_user(client, mocker):
'fetch_one',
return_value={
'_id': '1',
+ 'projectId': '1',
'portfolioId': '1',
'googleId': 'other_test',
'authorizations': [{
@@ -126,6 +131,7 @@ def test_delete_project(client, mocker):
'fetch_one',
return_value={
'_id': '1',
+ 'projectId': '1',
'portfolioId': '1',
'googleId': 'test',
'scenarioIds': ['1'],