Skip to content

Commit

Permalink
7848 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arthanson committed Nov 7, 2024
1 parent b2f367d commit b184dc3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions netbox/core/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,10 @@ def test_background_task_stop(self):
worker.prepare_job_execution(job)

self.assertEqual(job.get_status(), JobStatus.STARTED)

# Stop those jobs using the view
started_job_registry = StartedJobRegistry(queue.name, connection=queue.connection)
# self.assertEqual(len(started_job_registry), 1)
response = self.client.get(reverse('core-api:background_task_stop', args=[job.id]), **self.header)
self.assertEqual(response.status_code, 200)
worker.monitor_work_horse(job, queue) # Sets the job as Failed and removes from Started
started_job_registry = StartedJobRegistry(queue.name, connection=queue.connection)
self.assertEqual(len(started_job_registry), 0)

canceled_job_registry = FailedJobRegistry(queue.name, connection=queue.connection)
Expand Down

0 comments on commit b184dc3

Please sign in to comment.