예제 #1
0
 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(),
     )
예제 #2
0
 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(),
     )
예제 #3
0
        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
예제 #4
0
 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,
     )
예제 #6
0
 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,
     )
예제 #7
0
 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()
예제 #8
0
 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()