~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/job/tests/test_runner.py

  • Committer: Aaron Bentley
  • Date: 2011-08-18 16:07:06 UTC
  • mto: This revision was merged to the branch mainline in revision 13737.
  • Revision ID: aaron@canonical.com-20110818160706-q2t7ps5o106pebq0
Add tests for --log-twisted option.

Show diffs side-by-side

added added

removed removed

Lines of Context:
647
647
            cronscript.main()
648
648
        finally:
649
649
            errorlog.globalErrorUtility = old_errorlog
 
650
 
 
651
    def test_log_twisted_option_for_twisted_runner(self):
 
652
        jcs = JobCronScript(TwistedJobRunner, test_args=[])
 
653
        self.assertIsNot(None, getattr(jcs.options, 'log_twisted', None))
 
654
 
 
655
    def test_no_log_twisted_option_for_plain_runner(self):
 
656
        jcs = JobCronScript(JobRunner, test_args=[])
 
657
        self.assertIs(None, getattr(jcs.options, 'log_twisted', None))