Esempio n. 1
0
def test_get_existing_exchange(pulse_connection):
    with create_and_destroy_exchange(pulse_connection, "foobar"):
        # shouldn't throw an error about a non-existant connection
        get_exchange(pulse_connection, "foobar")
Esempio n. 2
0
def test_get_new_exchange(pulse_connection):
    """Test we can create a new exchange on the given connection."""
    exchange = get_exchange(pulse_connection, "new_exchange", create=True)

    assert isinstance(exchange, Exchange)
    assert exchange.name == "new_exchange"
Esempio n. 3
0
 def build_exchange(name, create_exchange):
     return get_exchange(pulse_connection, name, create=create_exchange)
Esempio n. 4
0
 def build_exchange(name, create_exchange):
     return get_exchange(pulse_connection, name, create=create_exchange)
Esempio n. 5
0
def test_get_new_exchange(pulse_connection):
    """Test we can create a new exchange on the given connection."""
    exchange = get_exchange(pulse_connection, "new_exchange", create=True)

    assert isinstance(exchange, Exchange)
    assert exchange.name == "new_exchange"
Esempio n. 6
0
def test_get_existing_exchange(pulse_connection):
    with create_and_destroy_exchange(pulse_connection, "foobar"):
        # shouldn't throw an error about a non-existant connection
        get_exchange(pulse_connection, "foobar")