def build_tests(self): """Build data manager test methods.""" import functional.test_data_managers functional.test_data_managers.data_managers = self.app.data_managers functional.test_data_managers.build_tests( tmp_dir=self.galaxy_test_tmp_dir, testing_shed_tools=self.testing_shed_tools, master_api_key=get_master_api_key(), user_api_key=get_user_api_key(), )
def _run_functional_test(testing_shed_tools=None): workflow_test = __check_arg("-workflow", param=True) if workflow_test: import functional.workflow functional.workflow.WorkflowTestCase.workflow_test_file = workflow_test functional.workflow.WorkflowTestCase.master_api_key = master_api_key functional.workflow.WorkflowTestCase.user_api_key = get_user_api_key() data_manager_test = __check_arg("-data_managers", param=False) if data_manager_test: import functional.test_data_managers functional.test_data_managers.data_managers = app.data_managers # seems like a hack... functional.test_data_managers.build_tests( tmp_dir=data_manager_test_tmp_path, testing_shed_tools=testing_shed_tools, master_api_key=master_api_key, user_api_key=get_user_api_key(), ) else: # We must make sure that functional.test_toolbox is always imported after # database_contexts.galaxy_content is set (which occurs in this method above). # If functional.test_toolbox is imported before database_contexts.galaxy_content # is set, sa_session will be None in all methods that use it. import functional.test_toolbox functional.test_toolbox.toolbox = app.toolbox # When testing data managers, do not test toolbox. functional.test_toolbox.build_tests( app=app, testing_shed_tools=testing_shed_tools, master_api_key=master_api_key, user_api_key=get_user_api_key(), ) test_config = nose.config.Config( env=os.environ, ignoreFiles=ignore_files, plugins=nose.plugins.manager.DefaultPluginManager() ) test_config.plugins.addPlugin(StructuredTestDataPlugin()) test_config.configure(sys.argv) result = run_tests(test_config) success = result.wasSuccessful() return success
def _run_functional_test(testing_shed_tools=None): workflow_test = __check_arg('-workflow', param=True) if workflow_test: import functional.workflow functional.workflow.WorkflowTestCase.workflow_test_file = workflow_test functional.workflow.WorkflowTestCase.master_api_key = master_api_key functional.workflow.WorkflowTestCase.user_api_key = get_user_api_key( ) data_manager_test = __check_arg('-data_managers', param=False) if data_manager_test: import functional.test_data_managers functional.test_data_managers.data_managers = app.data_managers #seems like a hack... functional.test_data_managers.build_tests( tmp_dir=data_manager_test_tmp_path, testing_shed_tools=testing_shed_tools, master_api_key=master_api_key, user_api_key=get_user_api_key(), ) else: # We must make sure that functional.test_toolbox is always imported after # database_contexts.galaxy_content is set (which occurs in this method above). # If functional.test_toolbox is imported before database_contexts.galaxy_content # is set, sa_session will be None in all methods that use it. import functional.test_toolbox functional.test_toolbox.toolbox = app.toolbox # When testing data managers, do not test toolbox. functional.test_toolbox.build_tests( app=app, testing_shed_tools=testing_shed_tools, master_api_key=master_api_key, user_api_key=get_user_api_key(), ) test_config = nose.config.Config( env=os.environ, ignoreFiles=ignore_files, plugins=nose.plugins.manager.DefaultPluginManager()) test_config.plugins.addPlugin(StructuredTestDataPlugin()) test_config.configure(sys.argv) result = run_tests(test_config) success = result.wasSuccessful() return success
def build_tests(self): """Build data manager test methods.""" import functional.test_data_managers functional.test_data_managers.data_managers = self.app.data_managers functional.test_data_managers.build_tests( tmp_dir=self.galaxy_test_tmp_dir, testing_shed_tools=self.testing_shed_tools, master_api_key=get_master_api_key(), user_api_key=get_user_api_key(), user_email=self.app.config.admin_users_list[0], create_admin=True, )
def build_tests(self): """Setup WorkflowTestCase for test execution.""" import functional.workflow functional.workflow.WorkflowTestCase.master_api_key = get_master_api_key( ) functional.workflow.WorkflowTestCase.user_api_key = get_user_api_key()
def build_tests(self): """Setup WorkflowTestCase for test execution.""" import functional.workflow functional.workflow.WorkflowTestCase.master_api_key = get_master_api_key() functional.workflow.WorkflowTestCase.user_api_key = get_user_api_key()