From ee163fe9a143e237c68301e78b8a63559f7e1213 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 22 Sep 2021 16:17:19 +0300 Subject: [PATCH] add test_api_publication_get --- tests/test_pub1c-rest.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/test_pub1c-rest.py b/tests/test_pub1c-rest.py index f9707dc..50fdbed 100644 --- a/tests/test_pub1c-rest.py +++ b/tests/test_pub1c-rest.py @@ -169,3 +169,17 @@ def test_api_publications_add_and_list(client): assert data[1]['is_file_infobase'] assert data[1]['infobase_filepath'] == '/path/to/infobase' + +def test_api_publication_get(client): + # add publications + client.put(path='/api/v1/publications', data={'name': 'test123'}) + # get + response = client.get('/api/v1/publications/test123') + data = response.get_json() + assert 'test123' in data + data = data['test123'] + assert data['name'] == 'test123' + assert data['publicated'] + assert data['url'] == '/1c/test123' + assert not data['is_file_infobase'] +