Skip to content

Commit 2f69433

Browse files
committed
fix:test check context
1 parent 541afe0 commit 2f69433

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scheduler/tests/test_task_types/test_once_task.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ def test_admin_change_view__has_execution_list(self):
4848
self.assertContains(res, task.job_name, status_code=200)
4949
self.assertContains(res, "Scheduled", status_code=200)
5050
self.assertContains(res, """<span id="counter">1""", status_code=200)
51+
self.assertFalse(res.context["pagination_required"])
52+
self.assertEqual(res.context["executions"].paginator.count, 1)
5153

5254
@time_machine.travel(datetime(2016, 12, 25))
5355
def test_admin_change_view__has_empty_execution_list(self):
@@ -64,6 +66,8 @@ def test_admin_change_view__has_empty_execution_list(self):
6466
self.assertContains(res, "Job executions")
6567
self.assertContains(res, """<table id="result_list">""")
6668
self.assertContains(res, """<span id="counter">0""", status_code=200)
69+
self.assertFalse(res.context["pagination_required"])
70+
self.assertEqual(res.context["executions"].paginator.count, 0)
6771

6872
def test_create_without_date__fail(self):
6973
task = task_factory(self.task_type, scheduled_time=None, instance_only=True)

0 commit comments

Comments
 (0)