def test_next_three_hours_after_specified_time(self):
     d = datetime(2013, 12, 7, 15, 46, 12)
     expected = d + timedelta(hours=3)
     result = timeutils.next_three_hours(d)
     self.assertAlmostEqual(expected, result)
Exemple #2
0
 def test_next_three_hours_after_specified_time(self):
     d = datetime(2013, 12, 7, 15, 46, 12)
     expected = d + timedelta(hours=3)
     result = timeutils.next_three_hours(d)
     self.assertAlmostEqual(expected, result)
 def test_next_three_hours(self):
     result = timeutils.next_three_hours()
     expected = datetime.now() + timedelta(hours=3)
     self.assertAlmostEqual(float(timeformatutils.to_UNIXtime(expected)),
                            float(timeformatutils.to_UNIXtime(result)))
Exemple #4
0
 def test_next_three_hours(self):
     result = timeutils.next_three_hours()
     expected = datetime.now() + timedelta(hours=3)
     self.assertAlmostEqual(
        float(timeformatutils.to_UNIXtime(expected)),
        float(timeformatutils.to_UNIXtime(result)))