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/test_dates.py: Fix broken test #714

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions tests/test_dates.py
Expand Up @@ -761,7 +761,6 @@ def test_zh_TW_format():


def test_format_current_moment(monkeypatch):
import datetime as datetime_module
frozen_instant = datetime.utcnow()

class frozen_datetime(datetime):
Expand All @@ -771,7 +770,7 @@ def utcnow(cls):
return frozen_instant

# Freeze time! Well, some of it anyway.
monkeypatch.setattr(datetime_module, "datetime", frozen_datetime)
monkeypatch.setattr(dates, "datetime_", frozen_datetime)
assert dates.format_datetime(locale="en_US") == dates.format_datetime(frozen_instant, locale="en_US")


Expand Down