Skip to content

Commit

Permalink
tests: fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
azmeuk committed Jan 10, 2025
1 parent a25bfe0 commit 9bbad78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions tests/app/commands/test_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import json
from unittest import mock

import pytest

from canaille.backends import ModelEncoder
from canaille.commands import cli

Expand All @@ -15,6 +17,9 @@ def test_serialize(user):
== '{"foo": "1970-01-01T00:00:00"}'
)

with pytest.raises(TypeError):
json.dumps({"foo": object()}, cls=ModelEncoder)


def test_get_list_models(testclient, backend, user):
"""Nominal case test for model get command."""
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_profile_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_edition(testclient, logged_user, admin, foo_group, bar_group, backend):
assert bar_group.members == [admin]
assert "readonly" in res.form["groups"].attrs
assert "readonly" in res.form["user_name"].attrs

res = testclient.get("/profile/user/settings", status=200)
res.form["user_name"] = "user"
res.form["password1"] = "i'm a little pea"
Expand Down

0 comments on commit 9bbad78

Please sign in to comment.