Ejemplo n.º 1
0
 def test_createSimulator(self):
     """
     L{LoadSimulator.createSimulator} creates a L{CalendarClientSimulator}
     with its own reactor and host and port information from the
     configuration file.
     """
     servers = {
         "PodA": {
             "enabled": True,
             "uri": 'http://example.org:1234/',
             "stats": {
                 "enabled": False
             },
         },
     }
     reactor = object()
     sim = LoadSimulator(servers,
                         None,
                         None,
                         None,
                         None,
                         None,
                         None,
                         reactor=reactor)
     calsim = sim.createSimulator()
     self.assertIsInstance(calsim, CalendarClientSimulator)
     self.assertIsInstance(calsim.reactor, LagTrackingReactor)
     self.assertIdentical(calsim.reactor._reactor, reactor)
     self.assertEquals(calsim.servers, servers)
Ejemplo n.º 2
0
 def test_createSimulator(self):
     """
     L{LoadSimulator.createSimulator} creates a L{CalendarClientSimulator}
     with its own reactor and host and port information from the
     configuration file.
     """
     server = 'http://127.0.0.7:1243/'
     reactor = object()
     sim = LoadSimulator(server, None, None, None, None, None, None, reactor=reactor)
     calsim = sim.createSimulator()
     self.assertIsInstance(calsim, CalendarClientSimulator)
     self.assertIsInstance(calsim.reactor, LagTrackingReactor)
     self.assertIdentical(calsim.reactor._reactor, reactor)
     self.assertEquals(calsim.server, server)
Ejemplo n.º 3
0
 def test_createSimulator(self):
     """
     L{LoadSimulator.createSimulator} creates a L{CalendarClientSimulator}
     with its own reactor and host and port information from the
     configuration file.
     """
     server = 'http://127.0.0.7:1243/'
     reactor = object()
     sim = LoadSimulator(server, None, None, None, None, None, None, reactor=reactor)
     calsim = sim.createSimulator()
     self.assertIsInstance(calsim, CalendarClientSimulator)
     self.assertIsInstance(calsim.reactor, LagTrackingReactor)
     self.assertIdentical(calsim.reactor._reactor, reactor)
     self.assertEquals(calsim.server, server)