Skip to content

Commit

Permalink
Increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Fatal1ty committed Nov 24, 2024
1 parent 15374ae commit 0395972
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test_jsonschema/test_json_schema_common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import pytest

from mashumaro.config import BaseConfig
from mashumaro.jsonschema.models import (
JSONSchemaStringFormat,
_deserialize_json_schema_instance_format,
)
from mashumaro.jsonschema.schema import Instance


Expand All @@ -9,3 +15,12 @@ def test_instance_get_configs():

derived = instance.derive()
assert derived.get_self_config() is instance.get_self_config()


def test_deserialize_json_schema_instance_format():
assert (
_deserialize_json_schema_instance_format("email")
is JSONSchemaStringFormat.EMAIL
)
with pytest.raises(ValueError):
assert _deserialize_json_schema_instance_format("foobar")

0 comments on commit 0395972

Please sign in to comment.