Queries with non-null ``schedule['until']`` are reported by Query.outdated_queries() before the given time is past.
(self)
| 298 | self.assertNotIn(query, queries) |
| 299 | |
| 300 | def test_schedule_until_before(self): |
| 301 | """ |
| 302 | Queries with non-null ``schedule['until']`` are reported by |
| 303 | Query.outdated_queries() before the given time is past. |
| 304 | """ |
| 305 | one_day_from_now = (utcnow() + datetime.timedelta(days=1)).strftime("%Y-%m-%d") |
| 306 | query = self.create_scheduled_query(interval="3600", until=one_day_from_now) |
| 307 | self.fake_previous_execution(query, hours=2) |
| 308 | |
| 309 | queries = models.Query.outdated_queries() |
| 310 | |
| 311 | self.assertIn(query, queries) |
| 312 | |
| 313 | def test_skips_and_disables_faulty_queries(self): |
| 314 | faulty_query = self.create_scheduled_query(until="pigs fly") |
nothing calls this directly
no test coverage detected