~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/mailman/tests/test_xmlrpcrunner.py

  • Committer: Gary Poster
  • Date: 2011-07-27 15:25:32 UTC
  • mto: This revision was merged to the branch mainline in revision 13541.
  • Revision ID: gary.poster@canonical.com-20110727152532-50akr19c7mgcj5qu
add config option for timeout value

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
from Mailman import Errors
13
13
from Mailman.Logging.Syslog import syslog
 
14
from Mailman import mm_cfg
14
15
from Mailman.Queue.XMLRPCRunner import (
15
16
    handle_proxy_error,
16
17
    XMLRPCRunner,
17
18
    )
18
19
 
 
20
from canonical.config import config
19
21
from canonical.testing.layers import (
20
22
    BaseLayer,
21
23
    DatabaseFunctionalLayer,
61
63
        # look in the dict.
62
64
        transport = proxy.__dict__['_ServerProxy__transport']
63
65
        self.assertTrue(isinstance(transport, Transport))
64
 
        self.assertEqual(5, transport.timeout)
 
66
        self.assertEqual(mm_cfg.XMLRPC_TIMEOUT, transport.timeout)
 
67
        # This is a bit rickety--if the mailman config was built under a
 
68
        # different instance that has a different timeout value, this will
 
69
        # fail.  Removing this next assertion would probably be OK then, but
 
70
        # I think it is nice to have.
 
71
        self.assertEqual(config.mailman.xmlrpc_timeout, mm_cfg.XMLRPC_TIMEOUT)
65
72
 
66
73
 
67
74
class TestXMLRPCRunnerHeatBeat(MailmanTestCase):