Commit 5dd172b3 by Calen Pennington

Use consistent beginning_of_day function

parent eff9c9c9
......@@ -65,7 +65,7 @@ class ScheduleMessageBaseTask(Task):
@classmethod
def enqueue(cls, site, current_date, day_offset, override_recipient_email=None):
current_date = current_date.replace(hour=0, minute=0, second=0)
current_date = resolvers._get_datetime_beginning_of_day(current_date)
if not cls.is_enqueue_enabled(site):
cls.log_debug(
......
......@@ -58,7 +58,7 @@ class TestScheduleMessageBaseTask(CacheIsolationTestCase):
current_date=current_date,
day_offset=day_offset
)
target_date = current_date.replace(hour=0, minute=0, second=0) + \
target_date = current_date.replace(hour=0, minute=0, second=0, microsecond=0) + \
datetime.timedelta(day_offset)
print(patches['log_debug'].mock_calls)
patches['log_debug'].assert_any_call(
......
Markdown is supported
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