Exemplo n.º 1
0
def test_proxy_manual_start_stop(container_factory, rabbit_config):

    container = container_factory(FooService, rabbit_config)
    container.start()

    foobar_proxy = RpcProxy('foobar', rabbit_config)
    foo = foobar_proxy.start()
    assert foo.spam(ham='eggs') == 'eggs'
    assert foo.spam(ham='eggs') == 'eggs'  # test re-use
    foobar_proxy.stop()
Exemplo n.º 2
0
def test_proxy_manual_start_stop(container_factory, rabbit_config):

    container = container_factory(FooService, rabbit_config)
    container.start()

    foobar_proxy = RpcProxy('foobar', rabbit_config)
    foo = foobar_proxy.start()
    assert foo.spam(ham='eggs') == 'eggs'
    assert foo.spam(ham='eggs') == 'eggs'  # test re-use
    foobar_proxy.stop()
Exemplo n.º 3
0
 def make_proxy(service_name, **kwargs):
     proxy = RpcProxy(service_name, rabbit_config, **kwargs)
     all_proxies.append(proxy)
     return proxy.start()
Exemplo n.º 4
0
 def make_proxy(service_name, **kwargs):
     proxy = RpcProxy(service_name, rabbit_config, **kwargs)
     all_proxies.append(proxy)
     return proxy.start()