Skip to content
Snippets Groups Projects
Unverified Commit 59ae37b3 authored by Feanil Patel's avatar Feanil Patel Committed by GitHub
Browse files

Merge pull request #21903 from edx/feanil/fix_date_mock

Fix datetime mock to only mock the now function.
parents 5e5c8572 31329821
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% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment