From 3132982141277ac80100ccb6684183f887c24041 Mon Sep 17 00:00:00 2001
From: Feanil Patel <feanil@edx.org>
Date: Tue, 1 Oct 2019 16:17:45 -0400
Subject: [PATCH] Fix datetime mock to only mock the now function.

---
 openedx/features/discounts/tests/test_applicability.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openedx/features/discounts/tests/test_applicability.py b/openedx/features/discounts/tests/test_applicability.py
index 0a45374570a..18767472314 100644
--- a/openedx/features/discounts/tests/test_applicability.py
+++ b/openedx/features/discounts/tests/test_applicability.py
@@ -148,6 +148,6 @@ class TestApplicability(ModuleStoreTestCase):
         with patch('openedx.features.discounts.applicability.stable_bucketing_hash_group', return_value=0):
             with patch(
                 'openedx.features.discounts.applicability.datetime',
-                Mock(now=Mock(return_value=datetime(2020, 8, 1, 0, 1, tzinfo=pytz.UTC)))
+                Mock(now=Mock(return_value=datetime(2020, 8, 1, 0, 1, tzinfo=pytz.UTC)), wraps=datetime),
             ):
                 assert not _is_in_holdback(self.user)
-- 
GitLab