diff --git a/packages/syft/src/syft/service/network/network_service.py b/packages/syft/src/syft/service/network/network_service.py index f3367caab0c..7181027bc7a 100644 --- a/packages/syft/src/syft/service/network/network_service.py +++ b/packages/syft/src/syft/service/network/network_service.py @@ -204,10 +204,9 @@ def add_peer( message="verify_key does not match the remote node's verify_key for add_peer" ) - remote_client = peer.client_with_context(context=context) - random_challenge = secrets.token_bytes(16) - try: + remote_client = peer.client_with_context(context=context) + random_challenge = secrets.token_bytes(16) remote_res = remote_client.api.services.network.ping( challenge=random_challenge ) diff --git a/tests/integration/network/gateway_test.py b/tests/integration/network/gateway_test.py index 3f5034586ad..b58b9cc12fb 100644 --- a/tests/integration/network/gateway_test.py +++ b/tests/integration/network/gateway_test.py @@ -9,9 +9,7 @@ def test_domain_connect_to_gateway(domain_1_port, gateway_port): - gateway_client: GatewayClient = sy.login( - port=gateway_port, email="info@openmined.org", password="changethis" - ) + gateway_client: GatewayClient = sy.login_as_guest(port=gateway_port) domain_client: DomainClient = sy.login( port=domain_1_port, email="info@openmined.org", password="changethis"