fix tests

This commit is contained in:
SvyatoslavArtymovych 2023-05-15 12:01:44 +03:00
parent b19582c69c
commit 789f4298eb
2 changed files with 4 additions and 0 deletions

View File

@ -1074,7 +1074,10 @@ def test_access_to_settings_page(client: FlaskClient):
_, user = login(client)
book_1 = m.Book(label="test", about="test").save()
m.BookVersion(semver="1.0.0", book_id=book_1.id).save()
book_2 = m.Book(label="test", about="test", user_id=user.id).save()
m.BookVersion(semver="1.0.0", book_id=book_2.id).save()
response: Response = client.get(
f"/book/{book_1.id}/settings",

View File

@ -120,6 +120,7 @@ def test_profile(client):
user_id=user.id,
)
book.save()
m.BookVersion(semver="1.0.0", book_id=book.id).save()
assert book
# profile page