(self)
| 386 | assert tb.restore_group('xxx-nonexisting-id') is None |
| 387 | |
| 388 | def test_cleanup(self): |
| 389 | tb = DatabaseBackend(self.uri, app=self.app) |
| 390 | for i in range(10): |
| 391 | tb.mark_as_done(uuid(), 42) |
| 392 | tb.save_group(uuid(), {'foo': 'bar'}) |
| 393 | s = tb.ResultSession() |
| 394 | for t in s.query(Task).all(): |
| 395 | t.date_done = datetime.now() - tb.expires * 2 |
| 396 | for t in s.query(TaskSet).all(): |
| 397 | t.date_done = datetime.now() - tb.expires * 2 |
| 398 | s.commit() |
| 399 | s.close() |
| 400 | |
| 401 | tb.cleanup() |
| 402 | |
| 403 | def test_Task__repr__(self): |
| 404 | assert 'foo' in repr(Task('foo')) |
nothing calls this directly
no test coverage detected