Changeset 9639 for main/waeup.kofa/trunk/src/waeup/kofa/tests
- Timestamp:
- 15 Nov 2012, 15:38:25 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/tests/test_reports.py
r9638 r9639 256 256 return 257 257 258 def test_report_status(self): 259 # We can get a report status apart from the job status 260 job = AsyncReportJob(self.root_folder, 'report1') 261 self.assertEqual(job.report_status, u'running') 262 return 263 264 def test_report_status_failed(self): 265 # A failed job is reflected in report_status 266 job = AsyncReportJob(self.root_folder, None) # no report generator 267 setSite(self.root_folder) 268 self.assertTrue(job.failed is None) 269 manager = getUtility(IJobManager) 270 manager.put(job) 271 wait_for_result(job) 272 self.assertEqual(job.report_status, u'FAILED') 273 return 274 275 def test_report_status_finished(self): 276 # A finished report is reflected in report_status 277 job = AsyncReportJob(self.root_folder, 'report1') 278 setSite(self.root_folder) 279 manager = getUtility(IJobManager) 280 manager.put(job) 281 wait_for_result(job) 282 self.assertEqual(job.report_status, u'finished') 283 return 284 258 285 class FakeJobWithResult(FakeJob): 259 286 … … 368 395 self.assertEqual( 369 396 result, 370 [('2', 'Report 1 ()', u' new', False, False),]397 [('2', 'Report 1 ()', u'running', False, False),] 371 398 ) 372 399 return
Note: See TracChangeset for help on using the changeset viewer.