summaryrefslogtreecommitdiff
path: root/web-server/opendc/api/v2/topologies/topologyId/test_endpoint.py
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-07-07 09:55:10 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:47:25 +0200
commitb4bdf9fde013bb7ff9579693b64ff575f7b00e44 (patch)
tree5e05ceba918849391a639bbeeab37d290a86523c /web-server/opendc/api/v2/topologies/topologyId/test_endpoint.py
parent7331e9baf2cfe7bdfb24effcf0a4801da1e7ea4d (diff)
Rename simulations to projects and remove experiment view
Diffstat (limited to 'web-server/opendc/api/v2/topologies/topologyId/test_endpoint.py')
-rw-r--r--web-server/opendc/api/v2/topologies/topologyId/test_endpoint.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/web-server/opendc/api/v2/topologies/topologyId/test_endpoint.py b/web-server/opendc/api/v2/topologies/topologyId/test_endpoint.py
index d3c20de3..b25cb798 100644
--- a/web-server/opendc/api/v2/topologies/topologyId/test_endpoint.py
+++ b/web-server/opendc/api/v2/topologies/topologyId/test_endpoint.py
@@ -6,9 +6,9 @@ def test_get_topology(client, mocker):
'fetch_one',
return_value={
'_id': '1',
- 'simulationId': '1',
+ 'projectId': '1',
'authorizations': [{
- 'simulationId': '1',
+ 'projectId': '1',
'authorizationLevel': 'EDIT'
}]
})
@@ -26,9 +26,9 @@ def test_get_topology_not_authorized(client, mocker):
'fetch_one',
return_value={
'_id': '1',
- 'simulationId': '1',
+ 'projectId': '1',
'authorizations': [{
- 'simulationId': '2',
+ 'projectId': '2',
'authorizationLevel': 'OWN'
}]
})
@@ -37,7 +37,7 @@ def test_get_topology_not_authorized(client, mocker):
def test_get_topology_no_authorizations(client, mocker):
- mocker.patch.object(DB, 'fetch_one', return_value={'simulationId': '1', 'authorizations': []})
+ mocker.patch.object(DB, 'fetch_one', return_value={'projectId': '1', 'authorizations': []})
res = client.get('/api/v2/topologies/1')
assert '403' in res.status
@@ -56,9 +56,9 @@ def test_update_topology_not_authorized(client, mocker):
'fetch_one',
return_value={
'_id': '1',
- 'simulationId': '1',
+ 'projectId': '1',
'authorizations': [{
- 'simulationId': '1',
+ 'projectId': '1',
'authorizationLevel': 'VIEW'
}]
})
@@ -76,9 +76,9 @@ def test_update_topology(client, mocker):
'fetch_one',
return_value={
'_id': '1',
- 'simulationId': '1',
+ 'projectId': '1',
'authorizations': [{
- 'simulationId': '1',
+ 'projectId': '1',
'authorizationLevel': 'OWN'
}]
})
@@ -97,11 +97,11 @@ def test_delete_topology(client, mocker):
'fetch_one',
return_value={
'_id': '1',
- 'simulationId': '1',
+ 'projectId': '1',
'googleId': 'test',
'topologyIds': ['1'],
'authorizations': [{
- 'simulationId': '1',
+ 'projectId': '1',
'authorizationLevel': 'OWN'
}]
})