Merge branch 'ldapper'
Conflicts: Dockerfile app.py data/database.py endpoints/index.py test/data/test.db
This commit is contained in:
commit
f6726bd0a4
25 changed files with 1157 additions and 94 deletions
|
@ -2,6 +2,7 @@ import unittest
|
|||
import json
|
||||
import time
|
||||
|
||||
from app import app
|
||||
from initdb import setup_database_for_testing, finished_database_for_testing
|
||||
from data.queue import WorkQueue
|
||||
|
||||
|
@ -25,7 +26,8 @@ class QueueTestCase(unittest.TestCase):
|
|||
|
||||
def setUp(self):
|
||||
self.reporter = SaveLastCountReporter()
|
||||
self.queue = WorkQueue(QUEUE_NAME, reporter=self.reporter)
|
||||
self.transaction_factory = app.config['DB_TRANSACTION_FACTORY']
|
||||
self.queue = WorkQueue(QUEUE_NAME, self.transaction_factory, reporter=self.reporter)
|
||||
setup_database_for_testing(self)
|
||||
|
||||
def tearDown(self):
|
||||
|
@ -118,7 +120,7 @@ class TestQueue(QueueTestCase):
|
|||
self.queue.put(['abc', 'def'], self.TEST_MESSAGE_1)
|
||||
self.queue.put(['def', 'def'], self.TEST_MESSAGE_2)
|
||||
|
||||
my_queue = WorkQueue(QUEUE_NAME, ['def'])
|
||||
my_queue = WorkQueue(QUEUE_NAME, self.transaction_factory, ['def'])
|
||||
|
||||
two = my_queue.get()
|
||||
self.assertNotEqual(None, two)
|
||||
|
|
Reference in a new issue