Пример #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'])