Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: fix Zürich timezone problems #847

Merged
merged 1 commit into from
Mar 13, 2020

Conversation

blankoworld
Copy link
Contributor

When timezone difference is positive it happens that the we compare an
hour superior or equal to 24. In these cases tests on loan/items fails.
This commit fixes that and it:

  • fixes check_timezone_date() using a modulo 24.
  • displays more info if an error happens in check_timezone_date test
  • changes get_timezone() description to correspond to reality
  • fixes a test that compare an UTC date to an non-UTC date

Co-Authored-by: Olivier DOSSMANN [email protected]

Why are you opening this PR?

Because tests failed on timezoned date. March, the 20th we will change the timezone from GMT+1 to GMT+2 which displays errors.

How to test?

pipenv run pytest -vvs --no-cov --disable-warnings tests/api/test_items_rest.py

Code review check list

  • Commit message template compliance.
  • Commit message without typos.
  • File names.
  • Functions names.
  • Functions docstrings.
  • Unnecessary commited files?
  • Extracted translations?

When timezone difference is positive it happens that the we compare an
hour superior or equal to 24. In these cases tests on loan/items fails.
This commit fixes that and it:

* fixes check_timezone_date() using a modulo 24.
* displays more info if an error happens in check_timezone_date test
* changes get_timezone() description to correspond to reality
* fixes a test that compare an UTC date to an non-UTC date

Co-Authored-by: Olivier DOSSMANN <[email protected]>
@blankoworld blankoworld merged commit 756b627 into rero:dev Mar 13, 2020
@blankoworld blankoworld deleted the doo-fix-zurich-tz branch March 30, 2020 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants