Exemple #1
0
def test_client_registry():
    from pseud.utils import create_local_registry, get_rpc_callable
    identity = 'client0'
    peer_identity = 'echo'
    registry = create_local_registry(identity)
    client = make_one_client(peer_identity, registry=registry)

    @client.register_rpc
    def foo():
        return 'bar'

    assert get_rpc_callable(name='foo', registry=client.registry)() == 'bar'
Exemple #2
0
def test_client_registry():
    from pseud.utils import create_local_registry, get_rpc_callable
    identity = 'client0'
    peer_identity = 'echo'
    registry = create_local_registry(identity)
    client = make_one_client(peer_identity,
                             registry=registry)

    @client.register_rpc
    def foo():
        return 'bar'

    assert get_rpc_callable(name='foo', registry=client.registry)() == 'bar'
Exemple #3
0
def test_client_registry():
    from pseud.utils import create_local_registry, get_rpc_callable
    user_id = b'client'
    peer_routing_id = b'echo'
    registry = create_local_registry(user_id)
    client = make_one_client(peer_routing_id,
                             user_id=user_id,
                             registry=registry)

    @client.register_rpc
    def foo():
        return 'bar'

    assert get_rpc_callable(name='foo', registry=client.registry)() == 'bar'
Exemple #4
0
    def test_client_registry(self):
        from pseud.utils import create_local_registry, get_rpc_callable
        user_id = b'client'
        peer_routing_id = b'echo'
        registry = create_local_registry(user_id)
        client = self.make_one_client(peer_routing_id, user_id=user_id,
                                      registry=registry)

        @client.register_rpc
        def foo():
            return 'bar'

        assert get_rpc_callable(name='foo',
                                registry=client.registry)() == 'bar'