def _fake_is_up_and_running_handlers(self): FakeUrllib2.reset() FakeSocket.reset() exp_handler = self.lab._assigned_experiments._retrieve_experiment_handler(self.experiment_instance_id) for handler in exp_handler.is_up_and_running_handlers.values(): handler._urllib2 = FakeUrllib2 handler._socket = FakeSocket exp_handler2 = self.lab._assigned_experiments._retrieve_experiment_handler(self.experiment_instance_id_old) for handler in exp_handler2.is_up_and_running_handlers.values(): handler._urllib2 = FakeUrllib2 handler._socket = FakeSocket
def _fake_is_up_and_running_handlers(self): FakeUrllib2.reset() FakeSocket.reset() exp_handler = self.lab._assigned_experiments._retrieve_experiment_handler( self.experiment_instance_id) for handler in exp_handler.is_up_and_running_handlers.values(): handler._urllib2 = FakeUrllib2 handler._socket = FakeSocket exp_handler2 = self.lab._assigned_experiments._retrieve_experiment_handler( self.experiment_instance_id_old) for handler in exp_handler2.is_up_and_running_handlers.values(): handler._urllib2 = FakeUrllib2 handler._socket = FakeSocket
def setUp(self): self.handler = WebcamIsUpAndRunningHandler("https://...") FakeUrllib2.reset() self.handler._urllib2 = FakeUrllib2