summaryrefslogtreecommitdiff
path: root/web-server/opendc/api/v2/experiments/experimentId/test_endpoint.py
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-07-06 08:43:42 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:47:24 +0200
commit7331e9baf2cfe7bdfb24effcf0a4801da1e7ea4d (patch)
tree5e999ef6007f89d2e06a26f65b0e37b9ce6e9bc4 /web-server/opendc/api/v2/experiments/experimentId/test_endpoint.py
parente254f4cc4fa6e2446fd4689cc7cabf3abbc24af6 (diff)
Make tests consistent
Diffstat (limited to 'web-server/opendc/api/v2/experiments/experimentId/test_endpoint.py')
-rw-r--r--web-server/opendc/api/v2/experiments/experimentId/test_endpoint.py30
1 files changed, 13 insertions, 17 deletions
diff --git a/web-server/opendc/api/v2/experiments/experimentId/test_endpoint.py b/web-server/opendc/api/v2/experiments/experimentId/test_endpoint.py
index f3aa111c..3532f9ae 100644
--- a/web-server/opendc/api/v2/experiments/experimentId/test_endpoint.py
+++ b/web-server/opendc/api/v2/experiments/experimentId/test_endpoint.py
@@ -48,12 +48,11 @@ def test_update_experiment_missing_parameter(client):
def test_update_experiment_non_existing(client, mocker):
mocker.patch.object(DB, 'fetch_one', return_value=None)
- assert '404' in client.put('/api/v2/experiments/1',
- json={
- 'experiment': {
- 'name': 'test',
- }
- }).status
+ assert '404' in client.put('/api/v2/experiments/1', json={
+ 'experiment': {
+ 'name': 'test',
+ }
+ }).status
def test_update_experiment_not_authorized(client, mocker):
@@ -68,12 +67,11 @@ def test_update_experiment_not_authorized(client, mocker):
}]
})
mocker.patch.object(DB, 'update', return_value={})
- assert '403' in client.put('/api/v2/experiments/1',
- json={
- 'experiment': {
- 'name': 'test',
- }
- }).status
+ assert '403' in client.put('/api/v2/experiments/1', json={
+ 'experiment': {
+ 'name': 'test',
+ }
+ }).status
def test_update_experiment(client, mocker):
@@ -89,11 +87,9 @@ def test_update_experiment(client, mocker):
})
mocker.patch.object(DB, 'update', return_value={})
- res = client.put(
- '/api/v2/experiments/1',
- json={'experiment': {
- 'name': 'test',
- }})
+ res = client.put('/api/v2/experiments/1', json={'experiment': {
+ 'name': 'test',
+ }})
assert '200' in res.status