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'] +