def setUp(self):
     self.setup_app()
     self.tool = MockTool(self.app)
     self.job = Job()
     self.job.history = History()
     self.job.parameters = [JobParameter(name="thresh", value="4")]
     self.evaluator = ToolEvaluator(self.app, self.tool, self.job, self.test_directory)
Exemple #2
0
def _setup_mapping_and_user():
    with TestConfig(DISK_TEST_CONFIG) as (test_config, object_store):
        # Start the database and connect the mapping
        model = mapping.init("/tmp",
                             "sqlite:///:memory:",
                             create_tables=True,
                             object_store=object_store,
                             slow_query_log_threshold=SLOW_QUERY_LOG_THRESHOLD,
                             thread_local_log=THREAD_LOCAL_LOG)

        u = User(email="*****@*****.**", password="******")
        h1 = History(name="HistoryCopyHistory1", user=u)
        model.context.add_all([u, h1])
        model.context.flush()
        yield test_config, object_store, model, h1