add test_api_publications_add_force
This commit is contained in:
parent
be03d196b7
commit
ab6ab52f24
@ -148,6 +148,19 @@ def test_api_publications_add(client):
|
|||||||
assert response.status_code == 409
|
assert response.status_code == 409
|
||||||
|
|
||||||
|
|
||||||
|
def test_api_publications_add_force(client):
|
||||||
|
endpoint = '/api/v1/publications'
|
||||||
|
# add
|
||||||
|
response = client.put(path=endpoint, data={'name': 'test123'})
|
||||||
|
assert response.status_code == 201
|
||||||
|
# add same publication
|
||||||
|
response = client.put(path=endpoint, data={'name': 'test123'})
|
||||||
|
assert response.status_code == 409
|
||||||
|
# add same publication with force
|
||||||
|
response = client.put(path=endpoint, data={'name': 'test123', 'force': True})
|
||||||
|
assert response.status_code == 201
|
||||||
|
|
||||||
|
|
||||||
def test_api_publications_add_and_list(client):
|
def test_api_publications_add_and_list(client):
|
||||||
endpoint = '/api/v1/publications'
|
endpoint = '/api/v1/publications'
|
||||||
# add publications
|
# add publications
|
||||||
|
Loading…
Reference in New Issue
Block a user