Пример #1
0
 def test_time_to_seconds(self):
     """Test time to seconds conversion."""
     correct_time = '1970-01-01T00:00:05+00:00'
     wrong_time = '1/1/1970 00:00:03'
     self.assertEqual(time_to_seconds(correct_time), 5)
     self.assertFalse(time_to_seconds(wrong_time))
Пример #2
0
 def check_new_video_time(self, timestamp):
     """Check if video has timestamp since last refresh."""
     return time_to_seconds(timestamp) > self.blink.last_refresh