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
|
import json
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
from canaille.backends import ModelEncoder
|
from canaille.backends import ModelEncoder
|
||||||
from canaille.commands import cli
|
from canaille.commands import cli
|
||||||
|
|
||||||
|
@ -15,6 +17,9 @@ def test_serialize(user):
|
||||||
== '{"foo": "1970-01-01T00:00:00"}'
|
== '{"foo": "1970-01-01T00:00:00"}'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
with pytest.raises(TypeError):
|
||||||
|
json.dumps({"foo": object()}, cls=ModelEncoder)
|
||||||
|
|
||||||
|
|
||||||
def test_get_list_models(testclient, backend, user):
|
def test_get_list_models(testclient, backend, user):
|
||||||
"""Nominal case test for model get command."""
|
"""Nominal case test for model get command."""
|
||||||
|
|
Loading…
Reference in a new issue