Skip to content

Commit

Permalink
update tests to allow new datetime behavior in PyYAML 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dtkav committed Jan 15, 2020
1 parent f55cb1c commit 279d570
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_flask_encoder.py
Expand Up @@ -63,7 +63,10 @@ def get_value(data, path):
return data

example = get_value(spec_data, 'paths./datetime.get.{}.example.value'.format(response_path))
assert example == '2000-01-23T04:56:07.000008Z'
assert example in [
'2000-01-23T04:56:07.000008+00:00', # PyYAML 5.3+
'2000-01-23T04:56:07.000008Z'
]
example = get_value(spec_data, 'paths./date.get.{}.example.value'.format(response_path))
assert example == '2000-01-23'
example = get_value(spec_data, 'paths./uuid.get.{}.example.value'.format(response_path))
Expand Down

0 comments on commit 279d570

Please sign in to comment.