From 00597ec99f587557b88b9982a2c41a2cb8db8112 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Thu, 25 Jun 2020 18:35:53 +0200 Subject: Add simulation put path --- opendc/api/v2/simulations/test_endpoint.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'opendc/api/v2/simulations/test_endpoint.py') diff --git a/opendc/api/v2/simulations/test_endpoint.py b/opendc/api/v2/simulations/test_endpoint.py index fe4ac6ed..d23df74a 100644 --- a/opendc/api/v2/simulations/test_endpoint.py +++ b/opendc/api/v2/simulations/test_endpoint.py @@ -7,7 +7,14 @@ def test_add_simulation_missing_parameter(client): def test_add_simulation(client, mocker): mocker.patch.object(DB, 'fetch_one', return_value={'_id': '1', 'authorizations': []}) - mocker.patch.object(DB, 'insert', return_value={'_id': '1', 'datetimeCreated': '000', 'datetimeEdit': '000', 'topologyIds': []}) + mocker.patch.object(DB, + 'insert', + return_value={ + '_id': '1', + 'datetimeCreated': '000', + 'datetimeEdit': '000', + 'topologyIds': [] + }) mocker.patch.object(DB, 'update', return_value={}) res = client.post('/api/v2/simulations', json={'simulation': {'name': 'test simulation'}}) assert 'datetimeCreated' in res.json['content'] -- cgit v1.2.3