def test_local_time_day_before_utc(self): assert datetime.datetime.now() == self.NOON_4_20 assert datetimeutils.today_midnight_utc() == self.MN_4_21 assert datetimeutils.today_utc() == self.MN_4_21.date() assert datetimeutils.yesterday_midnight_utc() == self.MN_4_20 assert datetimeutils.yesterday_utc() == self.MN_4_20.date()
def test_local_time_day_ahead_of_utc(self): assert datetime.datetime.now() == self.NOON_4_20 assert datetimeutils.today_midnight_utc() == self.MN_4_19 assert datetimeutils.today_utc() == self.MN_4_19.date() assert datetimeutils.yesterday_midnight_utc() == self.MN_4_18 assert datetimeutils.yesterday_utc() == self.MN_4_18.date()
def test_local_time_behind_but_same_day_as_utc(self): assert datetime.datetime.now() == self.NOON_4_20 assert datetimeutils.today_midnight_utc() == self.MN_4_20 assert datetimeutils.today_utc() == self.MN_4_20.date() assert datetimeutils.yesterday_midnight_utc() == self.MN_4_19 assert datetimeutils.yesterday_utc() == self.MN_4_19.date()