|
|
@@ -1,12 +1,10 @@
|
|
|
import uuid
|
|
|
from datetime import timedelta
|
|
|
|
|
|
-from django.test import SimpleTestCase, TestCase
|
|
|
+from django.test import TestCase
|
|
|
from django.utils import timezone
|
|
|
-from rq.job import JobStatus
|
|
|
|
|
|
from core.choices import JobStatusChoices
|
|
|
-from core.constants import RQ_TASK_STATUSES
|
|
|
from core.models import Job, ObjectChange
|
|
|
from core.tables import *
|
|
|
from utilities.testing import TableTestCases
|
|
|
@@ -92,13 +90,3 @@ class ObjectChangeTableTestCase(TableTestCases.StandardTableTestCase):
|
|
|
|
|
|
class ConfigRevisionTableTestCase(TableTestCases.StandardTableTestCase):
|
|
|
table = ConfigRevisionTable
|
|
|
-
|
|
|
-
|
|
|
-class BackgroundTaskStatusBadgeTestCase(SimpleTestCase):
|
|
|
- """
|
|
|
- Every RQ job status needs a badge, or BackgroundTaskTable fails to render a task in that status.
|
|
|
- """
|
|
|
- def test_every_rq_status_has_a_badge(self):
|
|
|
- for status in JobStatus:
|
|
|
- with self.subTest(status=status):
|
|
|
- self.assertIn(status, RQ_TASK_STATUSES)
|