Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix tests with mock timezone #7911

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

Merged
merged 1 commit into from
Apr 16, 2021

Conversation

terencehonles
Copy link
Contributor

Description

Django no longer checks for hasattr(timezone, 'localize') and instead does an inheritance check:

https://github.com/django/django/blob/da542ccab6d61e1467199b52f77f64a2d72f5faf/django/utils/timezone.py#L259-L261

@adamchainz adamchainz changed the title fix tests with mock timezone after django/django#13877 Fix tests with mock timezone Apr 16, 2021
@adamchainz adamchainz merged commit a0a2c5c into encode:master Apr 16, 2021
@adamchainz
Copy link
Contributor

Thanks for this. I'm also fixing the CI not to ignore failures on Django 3.2 in #7927

@terencehonles terencehonles deleted the fix-tests-with-Django-3.2 branch April 16, 2021 20:22
sigvef pushed a commit to sigvef/django-rest-framework that referenced this pull request Dec 3, 2022
After django/django#13877, Django no longer checks for `hasattr(timezone, 'localize')` and instead does an inheritance check.
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