def test_last_three_hours_before_specified_time(self):
     d = datetime(2013, 12, 7, 15, 46, 12)
     expected = d + timedelta(hours=-3)
     result = timeutils.last_three_hours(d)
     self.assertAlmostEqual(expected, result)
Exemplo n.º 2
0
 def test_last_three_hours_before_specified_time(self):
     d = datetime(2013, 12, 7, 15, 46, 12)
     expected = d + timedelta(hours=-3)
     result = timeutils.last_three_hours(d)
     self.assertAlmostEqual(expected, result)
 def test_last_three_hours(self):
     result = timeutils.last_three_hours()
     expected = datetime.now() + timedelta(hours=-3)
     self.assertAlmostEqual(float(timeformatutils.to_UNIXtime(expected)),
                            float(timeformatutils.to_UNIXtime(result)))
Exemplo n.º 4
0
 def test_last_three_hours(self):
     result = timeutils.last_three_hours()
     expected = datetime.now() + timedelta(hours=-3)
     self.assertAlmostEqual(
        float(timeformatutils.to_UNIXtime(expected)),
        float(timeformatutils.to_UNIXtime(result)))