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

test: fix library opening timezone due date #859

Merged
merged 1 commit into from
Mar 23, 2020

Conversation

blankoworld
Copy link
Contributor

As we will enter in GMT+2 in few days, a test failed as it compare wrong
date (first in Zurich timezone and second in UTC one).
We should compare dates in UTC only.

  • Compares date in UTC for opening hours of a given library

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

Why are you opening this PR?

Because of https://tree.taiga.io/project/rero21-reroils/task/1381

How to test?

./run-tests.sh

Code review check list

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

@blankoworld blankoworld requested a review from rerowep March 21, 2020 09:57
As we will enter in GMT+2 in few days, a test failed as it compare wrong
date (first in Zurich timezone and second in UTC one).
We should compare dates in UTC only.
* Compares date in UTC for opening hours of a given library

Co-Authored-by: Olivier DOSSMANN <[email protected]>
@blankoworld blankoworld force-pushed the doo-#1381-test-timezone-due-date branch from cf3cd4d to 66d7e8a Compare March 21, 2020 15:11
@blankoworld blankoworld requested a review from jma March 21, 2020 15:11
Copy link
Contributor

@rerowep rerowep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to write a script witch changes the date of the computer and running pipenv run pytest tests/api/test_loans_rest.py for every day of the year. Also running the same tests in a leap year to be sure we don't have problems with the date any more?
The test itself is ok now.

@blankoworld
Copy link
Contributor Author

Is it possible to write a script witch changes the date of the computer and running pipenv run pytest tests/api/test_loans_rest.py for every day of the year. Also running the same tests in a leap year to be sure we don't have problems with the date any more?
The test itself is ok now.

It's a good idea! I will check today.

@blankoworld blankoworld merged commit ca01c49 into rero:dev Mar 23, 2020
@blankoworld blankoworld deleted the doo-#1381-test-timezone-due-date 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.

5 participants