tests: fix coverage

This commit is contained in:
Éloi Rivard 2025-01-10 11:56:24 +01:00
parent a25bfe0b3a
commit 9bbad786e3
No known key found for this signature in database
GPG key ID: 7EDA204EA57DD184
2 changed files with 6 additions and 1 deletions

View file

@ -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."""