Exemplo n.º 1
0
 def setUp(self):
     self.sql_db = Database(config=DB_CONF)
     self.sql_db.init_db()
     self.app = api.app.test_client()
     # Replace the real production DB w/ a testing DB
     api.db = self.sql_db
     if not os.path.isdir(TEST_UPLOAD_FOLDER):
         os.makedirs(TEST_UPLOAD_FOLDER)
Exemplo n.º 2
0
 def setUp(self):
     self.sql_db = Database(config=DB_CONF)
     self.sql_db.init_db()
     self.app = api.app.test_client()
     # Replace the real production DB w/ a testing DB
     api.db = self.sql_db
     api.UPLOAD_FOLDER = TEST_UPLOAD_FOLDER
     if not os.path.isdir(api.UPLOAD_FOLDER):
         os.makedirs(api.UPLOAD_FOLDER)
     api.multiscanner_process = fake_multiscanner_process
Exemplo n.º 3
0
    def setUp(self):
        self.sql_db = Database(config=DB_CONF)
        self.sql_db.init_db()
        self.app = api.app.test_client()
        # Replace the real production DB w/ a testing DB
        api.db = self.sql_db
        api.UPLOAD_FOLDER = TEST_UPLOAD_FOLDER
        if not os.path.isdir(api.UPLOAD_FOLDER):
            os.makedirs(api.UPLOAD_FOLDER)

        # populate the DB w/ a task
        post_file(self.app)
        self.sql_db.update_task(task_id=1,
                                task_status='Complete',
                                report_id='report1')
Exemplo n.º 4
0
 def setUp(self):
     self.sql_db = Database(config=DB_CONF)
     self.sql_db.init_db()
Exemplo n.º 5
0
 def setUp(self):
     self.sql_db = Database(config=DB_CONF)
     self.sql_db.init_db()
     for i in range(0, 1000):
         self.sql_db.add_task()
         i += 1
Exemplo n.º 6
0
 def setUp(self):
     self.sql_db = Database(config=DB_CONF)
     self.sql_db.init_db()
     self.sql_db.add_task(task_status='Pending', )
Exemplo n.º 7
0
 def setUp(self):
     self.sql_db = Database(config=DB_CONF)
     self.sql_db.init_db()
     # Replace the real production DB w/ a testing DB
     celery_worker.db = self.sql_db