예제 #1
0
def test_listQueues():
    q = QueuePool(1)
    q.createQueue("hello")
    assert list(q.listQueues(names=True)) == [
        'hello', 'admin_out', 'admin_in', 'failed', 'success', 'logs',
        'metrics'
    ]
예제 #2
0
def test_getQueue():
    q = QueuePool(1)
    q.createQueue("test")
    assert isinstance(q.getQueue("test"), Queue)
예제 #3
0
def test_hasQueue():
    q = QueuePool(1)
    q.createQueue("test")
    assert (q.hasQueue("test"))
예제 #4
0
def test_createQueue():
    q = QueuePool(1)
    q.createQueue("test")
    assert (q.queue.test)
예제 #5
0
def test_listQueues():
    q = QueuePool(1)
    q.createQueue("hello")
    assert list(q.listQueues(names=True)) == ['hello', 'admin_out', 'admin_in', 'failed', 'success', 'logs', 'metrics']
예제 #6
0
def test_listQueues():
    q = QueuePool(1)
    q.createQueue("hello")
    assert sorted(list(q.listQueues(names=True))) == sorted(['hello', 'failed', 'success', 'logs', 'metrics'])
예제 #7
0
def test_getQueue():
    q = QueuePool(1)
    q.createQueue("test")
    assert isinstance(q.getQueue("test"), Queue)
예제 #8
0
def test_hasQueue():
    q = QueuePool(1)
    q.createQueue("test")
    assert (q.hasQueue("test"))
예제 #9
0
def test_createQueue():
    q = QueuePool(1)
    q.createQueue("test")
    assert (q.queue.test)
예제 #10
0
def test_listQueues():
    q = QueuePool(1)
    q.createQueue("hello")
    assert sorted(list(q.listQueues(names=True))) == sorted(
        ['hello', 'failed', 'success', 'logs', 'metrics'])