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

Pytest Timezone Warning Fixed #5739

Merged
merged 1 commit into from Jun 5, 2019

Conversation

saadmk11
Copy link
Member

While running tox -e py36 was getting fludded with pytest warnings like this:

readthedocs/api/v3/tests/test_projects.py::APIEndpointTests::test_unauthed_others_projects_detail
  /home/saad/dev/readthedocs.org/.tox/py36/lib/python3.6/site-packages/django/db/models/fields/__init__.py:1451: RuntimeWarning: DateTimeField User.date_joined received a naive datetime (2019-04-29 10:00:00) while time zone support is active.
    RuntimeWarning)
  /home/saad/dev/readthedocs.org/.tox/py36/lib/python3.6/site-packages/django/db/models/fields/__init__.py:1451: RuntimeWarning: DateTimeField Project.pub_date received a naive datetime (2019-04-29 10:00:00) while time zone support is active.
    RuntimeWarning)
  /home/saad/dev/readthedocs.org/.tox/py36/lib/python3.6/site-packages/django/db/models/fields/__init__.py:1451: RuntimeWarning: DateTimeField Project.modified_date received a naive datetime (2019-04-29 12:00:00) while time zone support is active.
    RuntimeWarning)
  /home/saad/dev/readthedocs.org/.tox/py36/lib/python3.6/site-packages/django/db/models/fields/__init__.py:1451: RuntimeWarning: DateTimeField Project.pub_date received a naive datetime (2019-04-29 10:00:00) while time zone support is active.
    RuntimeWarning)
  /home/saad/dev/readthedocs.org/.tox/py36/lib/python3.6/site-packages/django/db/models/fields/__init__.py:1451: RuntimeWarning: DateTimeField Project.modified_date received a naive datetime (2019-04-29 12:00:00) while time zone support is active.

made the datetime objects timezone aware to avoid getting these warnings.

@saadmk11 saadmk11 requested a review from a team May 30, 2019 11:06
@stsewd stsewd requested a review from a team May 30, 2019 15:48
@ericholscher
Copy link
Member

Simple enough 👍

@ericholscher ericholscher merged commit c64af2d into readthedocs:master Jun 5, 2019
@saadmk11 saadmk11 deleted the pytest-warning branch June 6, 2019 07:20
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.

None yet

3 participants