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)
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)
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)