diff --git a/webapp/tests/test_readers_whisper.py b/webapp/tests/test_readers_whisper.py index 15617c2ee..aa91617c7 100644 --- a/webapp/tests/test_readers_whisper.py +++ b/webapp/tests/test_readers_whisper.py @@ -79,14 +79,14 @@ def test_GzippedWhisperReader_get_intervals(self): ts = int(time.time()) intervals = reader.get_intervals() for interval in intervals: - self.assertEqual(int(interval.start), ts-60) - self.assertEqual(int(interval.end), ts) + self.assertEqual(int(interval.start), ts - 60) + self.assertIn(int(interval.end), [ts, ts - 1]) # read it again to validate cache works intervals = reader.get_intervals() for interval in intervals: - self.assertEqual(int(interval.start),ts-60) - self.assertEqual(int(interval.end), ts) + self.assertEqual(int(interval.start),ts - 60) + self.assertIn(int(interval.end), [ts, ts - 1]) # Confirm fetch works. def test_GzippedWhisperReader_fetch(self): @@ -120,14 +120,14 @@ def test_WhisperReader_get_intervals(self): ts = int(time.time()) intervals = reader.get_intervals() for interval in intervals: - self.assertEqual(int(interval.start),ts-60) - self.assertEqual(int(interval.end), ts) + self.assertEqual(int(interval.start),ts - 60) + self.assertIn(int(interval.end), [ts, ts - 1]) # read it again to validate cache works intervals = reader.get_intervals() for interval in intervals: - self.assertEqual(int(interval.start),ts-60) - self.assertEqual(int(interval.end), ts) + self.assertEqual(int(interval.start),ts - 60) + self.assertIn(int(interval.end), [ts, ts - 1]) # Confirm get_raw_step works def test_WhisperReader_get_raw_step(self):