add test_api_publications_add
This commit is contained in:
parent
9d9e213607
commit
72b13b7e98
@ -124,3 +124,21 @@ def test_api_infobases_available(client):
|
||||
actual.sort()
|
||||
assert actual == expected
|
||||
|
||||
|
||||
def test_api_publications(client):
|
||||
response = client.get('/api/v1/publications')
|
||||
data = response.get_json()
|
||||
assert data == []
|
||||
|
||||
|
||||
def test_api_publications_add(client):
|
||||
endpoint = '/api/v1/publications'
|
||||
# before add
|
||||
response = client.get(endpoint)
|
||||
data = response.get_json()
|
||||
assert data == []
|
||||
# add
|
||||
response = client.put(path=endpoint, data={'name': 'test123'})
|
||||
data = response.get_json()
|
||||
assert data['message'] == 'created'
|
||||
assert data['name'] == 'test123'
|
||||
|
Loading…
Reference in New Issue
Block a user