Skip to content

Commit

Permalink
Make format.
Browse files Browse the repository at this point in the history
  • Loading branch information
adk-swisstopo committed Aug 14, 2024
1 parent df7fb78 commit d7f0f3f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 8 additions & 4 deletions app/tests/tests_09/base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,11 +442,15 @@ def _check_value(self, path, key, value, current, ignore):
# Created and updated time are automatically set therefore don't do an exact
# test as we can't guess the exact time. So we just check these timestamps
# are from after the start of the test and before "now".
self.assertLessEqual(value, current[key],
msg=f'{path}: current datetime value is before test start time')
self.assertLessEqual(
value,
current[key],
msg=f'{path}: current datetime value is before test start time'
)
now = isoformat(utc_aware(datetime.now()))
self.assertGreaterEqual(now, current[key],
msg=f'{path}: current datetime value is after test end time')
self.assertGreaterEqual(
now, current[key], msg=f'{path}: current datetime value is after test end time'
)
elif key == 'href':
self.assertEqual(
urlparse(value).path,
Expand Down
12 changes: 8 additions & 4 deletions app/tests/tests_10/base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,11 +443,15 @@ def _check_value(self, path, key, value, current, ignore):
# Created and updated time are automatically set therefore don't do an exact
# test as we can't guess the exact time. So we just check these timestamps
# are from after the start of the test and before "now".
self.assertLessEqual(value, current[key],
msg=f'{path}: current datetime value is before test start time')
self.assertLessEqual(
value,
current[key],
msg=f'{path}: current datetime value is before test start time'
)
now = isoformat(utc_aware(datetime.now()))
self.assertGreaterEqual(now, current[key],
msg=f'{path}: current datetime value is after test end time')
self.assertGreaterEqual(
now, current[key], msg=f'{path}: current datetime value is after test end time'
)
elif key == 'href':
self.assertEqual(
urlparse(value).path,
Expand Down

0 comments on commit d7f0f3f

Please sign in to comment.