add test_api_infobases_all
This commit is contained in:
parent
4fd9c7330e
commit
bffa816ef1
@ -213,3 +213,24 @@ def test_api_publication_set_url(client):
|
||||
data = response.get_json()
|
||||
assert data['url'] == '/1c/another/url'
|
||||
|
||||
|
||||
def test_api_infobases_all(client):
|
||||
# add publications
|
||||
client.put(path='/api/v1/publications', data={'name': 'test1'})
|
||||
# get list
|
||||
response = client.get('/api/v1/infobases-all')
|
||||
data = response.get_json()
|
||||
assert len(data) == 3
|
||||
# bpdemo
|
||||
assert data[0]['name'] == 'bpdemo'
|
||||
assert not data[0]['publicated']
|
||||
assert data[0]['url'] == ''
|
||||
# test1
|
||||
assert data[1]['name'] == 'test1'
|
||||
assert data[1]['publicated']
|
||||
assert data[1]['url'] == '/1c/test1'
|
||||
assert not data[1]['is_file_infobase']
|
||||
# test2
|
||||
assert data[2]['name'] == 'test2'
|
||||
assert not data[2]['publicated']
|
||||
assert data[2]['url'] == ''
|
||||
|
Loading…
Reference in New Issue
Block a user