def setUp(self): super(RyuDriverTest, self).setUp() # fake up ryu.app.client and ryu.app.rest_nw_id # With those, plugin can be tested without ryu installed self.module_patcher = patch_fake_ryu_client() self.module_patcher.start()
def setUp(self): super(RyuDriverTest, self).setUp() # fake up ryu.app.client and ryu.app.rest_nw_id # With those, plugin can be tested without ryu installed self.module_patcher = patch_fake_ryu_client() self.module_patcher.start()
if __name__ == '__main__': exit_status = False # if a single test case was specified, # we should only invoked the tests once invoke_once = len(sys.argv) > 1 test_config['plugin_name'] = "ryu_quantum_plugin.RyuQuantumPlugin" test_config['default_net_op_status'] = OperationalStatus.UP test_config['default_port_op_status'] = OperationalStatus.DOWN cwd = os.getcwd() # patch modules for ryu.app.client and ryu.app.rest_nw_id # With those, plugin can be tested without ryu installed with patch_fake_ryu_client(): c = config.Config(stream=sys.stdout, env=os.environ, verbosity=3, includeExe=True, traverseNamespace=True, plugins=core.DefaultPluginManager()) c.configureWhere(quantum.tests.unit.__path__) exit_status = run_tests(c) if invoke_once: sys.exit(0) os.chdir(cwd)
import quantum.tests.unit if __name__ == '__main__': exit_status = False # if a single test case was specified, # we should only invoked the tests once invoke_once = len(sys.argv) > 1 test_config['plugin_name_v2'] = "ryu_quantum_plugin.RyuQuantumPluginV2" cwd = os.getcwd() # patch modules for ryu.app.client and ryu.app.rest_nw_id # With those, plugin can be tested without ryu installed with patch_fake_ryu_client(): c = config.Config(stream=sys.stdout, env=os.environ, verbosity=3, includeExe=True, traverseNamespace=True, plugins=core.DefaultPluginManager()) c.configureWhere(quantum.tests.unit.__path__) exit_status = run_tests(c) if invoke_once: sys.exit(0) os.chdir(cwd)