add test_api_publication_remove

This commit is contained in:
Dmitry Belyaev 2021-09-22 16:28:36 +03:00
parent ee163fe9a1
commit 7d91b69e81
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3

View File

@ -183,3 +183,17 @@ def test_api_publication_get(client):
assert data['url'] == '/1c/test123'
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