Skip to content

Commit

Permalink
chore: add test for integer type
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronsteers committed Oct 21, 2022
1 parent 372fc34 commit 8eb0026
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions tests/core/test_jsonschema_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
is_boolean_type,
is_date_or_datetime_type,
is_datetime_type,
is_integer_type,
is_object_type,
is_secret_type,
is_string_array_type,
is_string_type,
Expand Down Expand Up @@ -53,6 +55,7 @@
is_boolean_type,
is_date_or_datetime_type,
is_datetime_type,
is_integer_type,
is_secret_type,
is_string_array_type,
is_string_type,
Expand Down Expand Up @@ -330,6 +333,38 @@ def test_inbuilt_type(json_type: JSONTypeHelper, expected_json_schema: dict):
},
{is_array_type, is_string_array_type},
),
(
Property(
"my_prop7",
ObjectType(
Property("not_a_secret", StringType),
Property("is_a_secret", StringType, secret=True),
),
),
{
"my_prop7": {
"type": ["object", "null"],
"properties": {
"not_a_secret": {"type": ["string", "null"]},
"is_a_secret": {
"type": ["string", "null"],
"secret": True,
"writeOnly": True,
},
},
}
},
{is_object_type, is_secret_type},
),
(
Property("my_prop8", IntegerType),
{
"my_prop8": {
"type": ["integer", "null"],
}
},
{is_integer_type},
),
],
)
def test_property_creation(
Expand Down

0 comments on commit 8eb0026

Please sign in to comment.