Job with results is displayed properly
(self)
| 59 | self.assertContains(response, 'DeserializationError') |
| 60 | |
| 61 | def test_job_details_with_results(self): |
| 62 | """Job with results is displayed properly""" |
| 63 | queue = get_queue('default') |
| 64 | job = queue.enqueue(access_self) |
| 65 | queue_index = get_queue_index('default') |
| 66 | worker = get_worker('default') |
| 67 | worker.work(burst=True) |
| 68 | result = job.results()[0] |
| 69 | url = reverse('admin:django_rq_job_detail', args=[queue_index, job.id]) |
| 70 | response = self.client.get(url) |
| 71 | assert result.id |
| 72 | self.assertContains(response, 'ID') |
| 73 | self.assertContains(response, 'Type') |
| 74 | self.assertContains(response, 'Created At') |
| 75 | self.assertContains(response, reverse('admin:django_rq_result_detail', args=[queue_index, job.id, result.id])) |
| 76 | self.assertContains(response, result.id) |
| 77 | self.assertContains(response, result.type.name) |
| 78 | |
| 79 | def test_result_details(self): |
| 80 | """Result detail page shows successful and failed results and 404s""" |
nothing calls this directly
no test coverage detected