[Test] behave tests pass locally

This commit is contained in:
MinchinWeb 2021-05-16 21:14:45 -06:00
parent 9888d98860
commit e64ca2d5b7
4 changed files with 35 additions and 0 deletions

View file

@ -89,6 +89,16 @@ def entry_array_count(context, entry_number, name, items_number):
assert len(out_json["entries"][entry_number - 1][name]) == items_number
@then(
'entry {entry_number:d} should not have an array "{name}"'
)
def entry_not_array_item(context, entry_number, name):
# note that entry_number is 1-indexed.
out = context.stdout_capture.getvalue()
out_json = json.loads(out)
assert (name not in out_json["entries"][entry_number - 1])
@then("the output should be a valid XML string")
def assert_valid_xml_string(context):
output = context.stdout_capture.getvalue()