Skip to content
Snippets Groups Projects
Commit 31329821 authored by Feanil Patel's avatar Feanil Patel
Browse files

Fix datetime mock to only mock the now function.

parent 27aa7e4a
No related merge requests found
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment