From 77a8f48b89ced06b2857aca8fca69e8a5ba0927b Mon Sep 17 00:00:00 2001 From: teo Date: Thu, 8 Feb 2024 21:15:01 +0200 Subject: [PATCH] fix test --- packages/syft/src/syft/service/code/user_code.py | 4 ++-- packages/syft/tests/syft/users/user_code_test.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/syft/src/syft/service/code/user_code.py b/packages/syft/src/syft/service/code/user_code.py index 038e7b238e4..046b1c45a3a 100644 --- a/packages/syft/src/syft/service/code/user_code.py +++ b/packages/syft/src/syft/service/code/user_code.py @@ -1060,9 +1060,9 @@ def locate_launch_jobs(context: TransformContext) -> TransformContext: raise Exception(user_code.message) # TODO: Not great print(user_code) - user_code_link = LinkedObject.from_obj(user_code[0], node_uid=context.node.id) + user_code_link = LinkedObject.from_obj(user_code[-1], node_uid=context.node.id) - nested_codes[call] = (user_code_link, user_code[0].nested_codes) + nested_codes[call] = (user_code_link, user_code[-1].nested_codes) context.output["nested_codes"] = nested_codes return context diff --git a/packages/syft/tests/syft/users/user_code_test.py b/packages/syft/tests/syft/users/user_code_test.py index 1b2de804655..15b39534d3c 100644 --- a/packages/syft/tests/syft/users/user_code_test.py +++ b/packages/syft/tests/syft/users/user_code_test.py @@ -146,7 +146,7 @@ def test_nested_requests(worker, guest_client: User): root_domain_client = worker.root_client request = root_domain_client.requests[-1] - assert request.code.nested_requests == {"test_inner_func": "latest"} + root_domain_client.api.services.request.apply(request.id) request = root_domain_client.requests[-1]