class WsgiManagerTest(unittest.TestCase): def setUp(self): self.cfg_manager = ConfigurationManager() self.cfg_manager.append_module(configuration_module) self.cfg_manager._set_value(configuration_doc.FACADE_TIMEOUT, 0.001) self.current_port = new_port() self.cfg_manager._set_value(configuration_doc.CORE_FACADE_PORT, self.current_port) app = HelloWorldApp() self.server = wsgi_manager.WebLabWsgiServer(self.cfg_manager, application=app) @uses_module(wsgi_manager) def test_server(self): self.server.start() try: time.sleep(0.1) text = requests.get('http://127.0.0.1:%s/' % self.current_port, timeout=10).text self.assertEquals("Hello World\n", text) finally: self.server.stop()
class WsgiManagerTest(unittest.TestCase): def setUp(self): self.cfg_manager = ConfigurationManager() self.cfg_manager.append_module(configuration_module) self.cfg_manager._set_value(configuration_doc.FACADE_TIMEOUT, 0.001) self.current_port = new_port() self.cfg_manager._set_value(configuration_doc.CORE_FACADE_PORT, self.current_port) app = HelloWorldApp() self.server = wsgi_manager.WebLabWsgiServer(self.cfg_manager, application = app) @uses_module(wsgi_manager) def test_server(self): self.server.start() try: time.sleep(0.1) text = requests.get('http://127.0.0.1:%s/' % self.current_port, timeout = 10).text self.assertEquals("Hello World\n", text) finally: self.server.stop()
class WsgiManagerTest(unittest.TestCase): def setUp(self): self.cfg_manager = ConfigurationManager() self.cfg_manager.append_module(configuration_module) self.cfg_manager._set_value(configuration_doc.FACADE_TIMEOUT, 0.001) self.current_port = new_port() # TODO self.cfg_manager._set_value(configuration_doc.CORE_FACADE_PORT, self.current_port) app = HelloWorldApp() self.server = wsgi_manager.WebLabWsgiServer(self.cfg_manager, application = app) @uses_module(wsgi_manager) def test_mofa(self): self.server.start() try: text = urllib2.urlopen('http://127.0.0.1:%s/' % self.current_port).read() self.assertEquals("Hello World\n", text) finally: self.server.stop()
def setUp(self): cfg_manager = ConfigurationManager() cfg_manager.append_module(configuration_module) self.jtag_blazer = jtag_blazer.JTagBlazer(cfg_manager)
def setUp(self): cfg_manager = ConfigurationManager() cfg_manager.append_module(configuration_module) self.jtag_blazer = jtag_blazer.JTagBlazer(cfg_manager)
def setUp(self): digilent_adept.DEBUG = False cfg_manager = ConfigurationManager() cfg_manager.append_module(configuration_module) self.device = digilent_adept.DigilentAdept(cfg_manager)
def setUp(self): cfg_manager = ConfigurationManager() cfg_manager.append_module(configuration_module) self.device = digilent_adept.DigilentAdept(cfg_manager)