|
8 | 8 | from django.urls import reverse
|
9 | 9 |
|
10 | 10 | from scheduler.queues import get_queue
|
11 |
| -from scheduler.tools import create_worker |
12 |
| -from . import test_settings # noqa |
13 |
| -from .jobs import failing_job, long_job, test_job |
14 |
| -from .testtools import assert_message_in_response, task_factory, _get_job_from_scheduled_registry |
15 |
| -from ..models import ScheduledTask |
16 |
| -from ..rq_classes import JobExecution, ExecutionStatus |
| 11 | +from scheduler.rq_classes import JobExecution, ExecutionStatus |
| 12 | +from scheduler.tests import test_settings # noqa |
| 13 | +from scheduler.tests.jobs import failing_job, long_job, test_job |
| 14 | +from scheduler.tests.testtools import assert_message_in_response, task_factory, _get_job_from_scheduled_registry |
| 15 | +from scheduler.tools import create_worker, TaskType |
17 | 16 |
|
18 | 17 |
|
19 | 18 | class BaseTestCase(TestCase):
|
@@ -358,7 +357,7 @@ def test_job_details(self):
|
358 | 357 |
|
359 | 358 | def test_scheduled_job_details(self):
|
360 | 359 | """Job data is displayed properly"""
|
361 |
| - scheduled_job = task_factory(ScheduledTask, enabled=True) |
| 360 | + scheduled_job = task_factory(TaskType.ONCE, enabled=True) |
362 | 361 | job = _get_job_from_scheduled_registry(scheduled_job)
|
363 | 362 |
|
364 | 363 | url = reverse(
|
|
0 commit comments