~ubuntu-branches/ubuntu/precise/landscape-client/precise

« back to all changes in this revision

Viewing changes to landscape/broker/tests/test_service.py

  • Committer: Package Import Robot
  • Author(s): Andreas Hasenack
  • Date: 2012-03-19 09:33:34 UTC
  • mto: This revision was merged to the branch mainline in revision 41.
  • Revision ID: package-import@ubuntu.com-20120319093334-oxjttz163vvfgq8s
Tags: upstream-12.04
ImportĀ upstreamĀ versionĀ 12.04

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import os
2
2
 
3
 
from twisted.internet import reactor
4
 
 
5
3
from landscape.tests.helpers import LandscapeTest
6
4
from landscape.broker.tests.helpers import BrokerConfigurationHelper
7
5
from landscape.broker.service import BrokerService
8
6
from landscape.broker.transport import HTTPTransport
9
7
from landscape.broker.amp import RemoteBrokerConnector
10
8
from landscape.reactor import FakeReactor
 
9
from twisted.internet import reactor
11
10
 
12
11
 
13
12
class BrokerServiceTest(LandscapeTest):
54
53
 
55
54
    def test_pinger(self):
56
55
        """
57
 
        A L{BrokerService} instance has a proper C{pinger} attribute.
 
56
        A L{BrokerService} instance has a proper C{pinger} attribute. Its
 
57
        interval value is configured with the C{ping_interval} value.
58
58
        """
59
59
        self.assertEqual(self.service.pinger.get_url(), self.config.ping_url)
 
60
        self.assertEqual(30, self.service.pinger.get_interval())
 
61
        self.config.ping_interval = 20
 
62
        service = BrokerService(self.config)
 
63
        self.assertEqual(20, service.pinger.get_interval())
60
64
 
61
65
    def test_registration(self):
62
66
        """