improve test

This commit is contained in:
SvyatoslavArtymovych 2023-06-02 15:34:05 +03:00
parent 5169ab7f30
commit 4b9801e4e1
1 changed files with 9 additions and 0 deletions

View File

@ -127,3 +127,12 @@ def test_change_section_ordering(client):
assert len(collection.active_sections) == 1 assert len(collection.active_sections) == 1
assert section.position != new_position assert section.position != new_position
assert section.position == 1 assert section.position == 1
response: Response = client.post(
f"/book/{book.id}/{section.id}/section/change_position",
headers={"Content-Type": "application/json"},
json=dict(position=new_position, collection_id=999),
follow_redirects=True,
)
assert response.status_code == 404
assert response.json["message"] == "collection not found"