add test_api_publication_remove
This commit is contained in:
parent
ee163fe9a1
commit
7d91b69e81
@ -183,3 +183,17 @@ def test_api_publication_get(client):
|
|||||||
assert data['url'] == '/1c/test123'
|
assert data['url'] == '/1c/test123'
|
||||||
assert not data['is_file_infobase']
|
assert not data['is_file_infobase']
|
||||||
|
|
||||||
|
|
||||||
|
def test_api_publication_remove(client):
|
||||||
|
# add publications
|
||||||
|
client.put(path='/api/v1/publications', data={'name': 'test123'})
|
||||||
|
# get
|
||||||
|
response = client.get('/api/v1/publications/test123')
|
||||||
|
assert response.status_code == 200
|
||||||
|
# remove
|
||||||
|
response = client.delete('/api/v1/publications/test123')
|
||||||
|
assert response.status_code == 200
|
||||||
|
# get
|
||||||
|
response = client.get('/api/v1/publications/test123')
|
||||||
|
assert response.status_code == 404
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user