forked from Github-Mirrors/canaille
tests: fix coverage
This commit is contained in:
parent
a25bfe0b3a
commit
9bbad786e3
2 changed files with 6 additions and 1 deletions
|
@ -2,6 +2,8 @@ import datetime
|
|||
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."""
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue