Skip to content

Commit

Permalink
Add test for default behavior being untouched if no --job-class
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriels1234 committed Sep 13, 2024
1 parent 83ebb0b commit 91c6646
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scheduler/tests/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ def test_create_worker__scheduler_interval(self):
self.assertEqual(worker.scheduler.interval, 1)
settings.SCHEDULER_CONFIG['SCHEDULER_INTERVAL'] = prev

def test_get_worker_custom_classes(self):
def test_get_worker_with_custom_job_class(self):
# Test with string representation of job_class
worker = create_worker('default', job_class='rq.job.Job')
self.assertTrue(issubclass(worker.job_class, Job))
self.assertTrue(issubclass(worker.job_class, JobExecution))

def test_get_worker_without_custom_job_class(self):
worker = create_worker('default')
self.assertTrue(issubclass(worker.job_class, JobExecution))

0 comments on commit 91c6646

Please sign in to comment.