diff --git a/tests/app/commands/test_get.py b/tests/app/commands/test_get.py index bbd4fe18..06e3c5f4 100644 --- a/tests/app/commands/test_get.py +++ b/tests/app/commands/test_get.py @@ -2,6 +2,8 @@ import json from unittest import mock +import pytest + from canaille.backends import ModelEncoder from canaille.commands import cli @@ -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.""" diff --git a/tests/core/test_profile_settings.py b/tests/core/test_profile_settings.py index 673939af..f70f9758 100644 --- a/tests/core/test_profile_settings.py +++ b/tests/core/test_profile_settings.py @@ -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"