def test_call_with_no_args_or_kwargs(self, date_service, router): client = Client(router=router) with client: response = client.call("get_todays_date") today = date.today() assert response == today.isoformat()
def test_call_with_no_args_or_kwargs(self, date_service, router): client = Client(url=router.url) with client: response = client.call("get_todays_date") today = date.today() assert response == today.isoformat()
def main(): port = config('PORT') url = f'ws://*****:*****@example.com', 'blebs') if isinstance(x, Error): print('Error:', x.message) else: print(x) x = client.call('authenticate', '*****@*****.**', 'blebs') if isinstance(x, Error): print('Error:', x.message) else: print(x) client.stop()
def test_call_with_args_and_kwargs(self, hello_service, router): caller = Client(router=router) with caller: response = caller.call("say_greeting", "Simon", greeting="watcha") assert response == "watcha to Simon"
def test_call_with_args_but_no_kwargs(self, hello_service, router): caller = Client(router=router) with caller: response = caller.call("say_hello", "Simon") assert response == "Hello Simon"
def test_call_with_args_and_kwargs(self, hello_service, router): caller = Client(url=router.url) with caller: response = caller.call("say_greeting", "Simon", greeting="watcha") assert response == "watcha to Simon"
def test_call_with_args_but_no_kwargs(self, hello_service, router): caller = Client(url=router.url) with caller: response = caller.call("say_hello", "Simon") assert response == "Hello Simon"