Ejemplo 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")
Ejemplo 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"
Ejemplo n.º 3
0
 def build_exchange(name, create_exchange):
     return get_exchange(pulse_connection, name, create=create_exchange)
Ejemplo n.º 4
0
 def build_exchange(name, create_exchange):
     return get_exchange(pulse_connection, name, create=create_exchange)
Ejemplo 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"
Ejemplo 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")