add test_api_publication_get
This commit is contained in:
parent
cb2de342c2
commit
ee163fe9a1
@ -169,3 +169,17 @@ def test_api_publications_add_and_list(client):
|
|||||||
assert data[1]['is_file_infobase']
|
assert data[1]['is_file_infobase']
|
||||||
assert data[1]['infobase_filepath'] == '/path/to/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']
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user