~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/poppy/tests/test_twistedconfigreset.py

  • Committer: Ian Booth
  • Date: 2011-05-10 13:56:21 UTC
  • mto: This revision was merged to the branch mainline in revision 13063.
  • Revision ID: ian.booth@canonical.com-20110510135621-4lwd3whjls1ex6u2
Set up service properly using twisted

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
        # Does the gpghandler job get setup correctly.
20
20
 
21
21
        job_instance = GPGHandlerConfigResetJob()
 
22
        job_instance.startService()
22
23
        self.assertIsNot(None, job_instance._gpghandler_job)
23
24
        self.assertTrue(job_instance._gpghandler_job.running)
24
25
 
25
26
        # It should be scheduled for every 12 hours.
26
27
        self.assertEqual(12 * 3600, job_instance._gpghandler_job.interval)
 
28
 
 
29
        # We should be able to stop the job.
 
30
        job_instance.stopService()
 
31
        self.assertFalse(job_instance._gpghandler_job.running)