From 0180626f60a881bd695e6f16cd94f5f3040c1ad9 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 13 Jul 2018 17:27:58 +0200 Subject: [PATCH] test_event_str_and_repr: use timezone.now for consistency Ref: https://github.com/pinax/pinax-stripe/pull/576#discussion_r202386463 --- pinax/stripe/tests/test_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pinax/stripe/tests/test_models.py b/pinax/stripe/tests/test_models.py index 088f98b13..53ef04645 100644 --- a/pinax/stripe/tests/test_models.py +++ b/pinax/stripe/tests/test_models.py @@ -85,7 +85,7 @@ def test_event_processing_exception_str(self): self.assertTrue("Event=" in str(e)) def test_event_str_and_repr(self): - created_at = datetime.datetime.utcnow() + created_at = timezone.now() created_at_iso = created_at.replace(microsecond=0).isoformat() e = Event(kind="customer.deleted", webhook_message={}, created_at=created_at) self.assertTrue("customer.deleted" in str(e))