summaryrefslogtreecommitdiff
path: root/web-server/opendc/api/v2/simulations/simulationId/topologies/test_endpoint.py
diff options
context:
space:
mode:
authorjc0b <j@jc0b.computer>2020-06-30 14:12:07 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:43:10 +0200
commit66b2d85385d05abb590535da60341876ecdbab71 (patch)
tree0656f64a4179d419adac86e488e21def7a7fa2b8 /web-server/opendc/api/v2/simulations/simulationId/topologies/test_endpoint.py
parent88d8a9cbeae3466230db6bd13120bd4438abbc66 (diff)
parentc99ef7504a1374170f88b89faeb7e6dec6a55253 (diff)
Merge changes with upstream
Diffstat (limited to 'web-server/opendc/api/v2/simulations/simulationId/topologies/test_endpoint.py')
-rw-r--r--web-server/opendc/api/v2/simulations/simulationId/topologies/test_endpoint.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/web-server/opendc/api/v2/simulations/simulationId/topologies/test_endpoint.py b/web-server/opendc/api/v2/simulations/simulationId/topologies/test_endpoint.py
index 10b5e3c9..cc26e1b0 100644
--- a/web-server/opendc/api/v2/simulations/simulationId/topologies/test_endpoint.py
+++ b/web-server/opendc/api/v2/simulations/simulationId/topologies/test_endpoint.py
@@ -6,7 +6,16 @@ def test_add_topology_missing_parameter(client):
def test_add_topology(client, mocker):
- mocker.patch.object(DB, 'fetch_one', return_value={'_id': '1', 'authorizations': [{'simulationId': '1', 'authorizationLevel': 'OWN'}], 'topologyIds': []})
+ mocker.patch.object(DB,
+ 'fetch_one',
+ return_value={
+ '_id': '1',
+ 'authorizations': [{
+ 'simulationId': '1',
+ 'authorizationLevel': 'OWN'
+ }],
+ 'topologyIds': []
+ })
mocker.patch.object(DB,
'insert',
return_value={
@@ -22,5 +31,6 @@ def test_add_topology(client, mocker):
assert 'topologyIds' in res.json['content']
assert '200' in res.status
+
def test_add_topology_no_authorizations(client, mocker):
- pass \ No newline at end of file
+ pass