Added separate method to start Job independently from creating it; Jobs no longer start automatically when first saved. Added method on JobTemplate to create a new Job with defaults copied from the template.

This commit is contained in:
Chris Church
2013-04-19 18:11:31 -04:00
parent bc1f3e320e
commit 5901acb6a8
5 changed files with 108 additions and 57 deletions

View File

@@ -285,7 +285,9 @@ class AcomCallbackEventTest(BaseCommandTest):
def test_with_job_status_not_running(self):
# Events can only be added when the job is running.
self.assertEqual(self.job.status, 'pending')
self.assertEqual(self.job.status, 'new')
self.job.status = 'pending'
self.job.save()
result, stdout, stderr = self.run_command('acom_callback_event',
**self.valid_kwargs)
self.assertTrue(isinstance(result, CommandError))