def test_now(self): naive_now = datetime.utcnow() now = U.now(utc) self.assertEqual( now.timetuple(), naive_now.replace(tzinfo=utc).timetuple() )
def test_now_str(self): now = U.now(utc) self.assertEqual(now.strftime("%c"), U.now_str(utc), )