Skip to content

Commit

Permalink
Test string definition errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong committed Jul 13, 2024
1 parent 30b926e commit 60bd58f
Showing 1 changed file with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,44 @@ def rule():
),
],
),
(
"Invalid string definition",
"""
{
"States": {
"NoType": {}
}
}
""",
[
ValidationError(
"'Type' is a required property at 'States/NoType'",
rule=StateMachineDefinition(),
validator="required",
schema_path=deque(
[
"properties",
"States",
"patternProperties",
"^.{1,128}$",
"required",
]
),
path=deque(["States", "NoType"]),
),
ValidationError(
"'StartAt' is a required property",
rule=StateMachineDefinition(),
validator="required",
schema_path=deque(
[
"required",
]
),
path=deque([]),
),
],
),
],
)
def test_validate(
Expand Down

0 comments on commit 60bd58f

Please sign in to comment.