mirror of https://github.com/rq/rq.git
No need to test this backward compatibility.
This commit is contained in:
parent
17a4ed056d
commit
70d209a430
|
@ -3,11 +3,10 @@ from __future__ import (absolute_import, division, print_function,
|
|||
unicode_literals)
|
||||
|
||||
from datetime import datetime
|
||||
import warnings
|
||||
|
||||
from rq.compat import as_text, PY2
|
||||
from rq.exceptions import NoSuchJobError, UnpickleError
|
||||
from rq.job import get_current_job, Job, Status
|
||||
from rq.job import get_current_job, Job
|
||||
from rq.queue import Queue
|
||||
from rq.utils import utcformat
|
||||
|
||||
|
@ -328,21 +327,3 @@ class TestJob(RQTestCase):
|
|||
job.cancel()
|
||||
self.assertFalse(self.testconn.exists(job.key))
|
||||
self.assertFalse(self.testconn.exists(job.dependents_key))
|
||||
|
||||
def test_get_and_set_job_status(self):
|
||||
"""job.get_status and set_status have same functionality as property"""
|
||||
job = Job.create(func=say_hello)
|
||||
job2 = Job.create(func=say_hello)
|
||||
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
warnings.simplefilter("always")
|
||||
job.set_status(Status.FINISHED)
|
||||
job2.status = Status.FINISHED
|
||||
self.assertEqual(len(w), 1)
|
||||
self.assertTrue(issubclass(w[-1].category, DeprecationWarning))
|
||||
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
warnings.simplefilter("always")
|
||||
self.assertEqual(job.get_status(), job2.status)
|
||||
self.assertEqual(len(w), 1)
|
||||
self.assertTrue(issubclass(w[-1].category, DeprecationWarning))
|
||||
|
|
Loading…
Reference in New Issue