From 70d209a430c11296555b5bd7e54f0dfa10a85bfa Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Thu, 24 Jul 2014 11:31:26 +0200 Subject: [PATCH] No need to test this backward compatibility. --- tests/test_job.py | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/tests/test_job.py b/tests/test_job.py index 1b5164c..bbe5f7a 100644 --- a/tests/test_job.py +++ b/tests/test_job.py @@ -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))