diff --git a/tests/adapter/test_rpc.py b/tests/adapter/test_rpc.py index 51f2ed6..d21d0c2 100644 --- a/tests/adapter/test_rpc.py +++ b/tests/adapter/test_rpc.py @@ -54,6 +54,7 @@ class MyService: async def test_invoke_global_sync_function(self): """Test invoking a global synchronous function.""" result = await invoke_command( + package_name="my_package.my_module", class_name="__global__", function_name="greet_sync", kwargs={"name": "Alice"} @@ -63,6 +64,7 @@ class MyService: async def test_invoke_global_async_function(self): """Test invoking a global asynchronous function.""" result = await invoke_command( + package_name="my_package.my_module", class_name="__global__", function_name="greet_async", kwargs={"name": "Bob"} @@ -72,6 +74,7 @@ class MyService: async def test_invoke_class_sync_method(self): """Test invoking a class synchronous method.""" result = await invoke_command( + package_name="my_package.my_module", class_name="MyService", function_name="process_data_sync", kwargs={"data": "report", "count": 3} @@ -84,6 +87,7 @@ class MyService: async def test_invoke_class_async_method(self): """Test invoking a class asynchronous method.""" result = await invoke_command( + package_name="my_package.my_module", class_name="MyService", function_name="process_data_async", kwargs={"data": "metrics", "delay": 0.01} @@ -97,6 +101,7 @@ class MyService: """Test error handling when package is not found.""" with self.assertRaises(ModuleNotFoundError): await invoke_command( + package_name="non_existent_package", class_name="__global__", function_name="some_func", kwargs={} @@ -106,6 +111,7 @@ class MyService: """Test error handling when class is not found.""" with self.assertRaises(AttributeError): await invoke_command( + package_name="my_package.my_module", class_name="NonExistentClass", function_name="some_method", kwargs={} @@ -115,6 +121,7 @@ class MyService: """Test error handling when method is not found.""" with self.assertRaises(AttributeError): await invoke_command( + package_name="my_package.my_module", class_name="MyService", function_name="non_existent_method", kwargs={} @@ -123,6 +130,7 @@ class MyService: async def test_private_method_access(self): """Test that private methods can be accessed (Python doesn't enforce privacy).""" result = await invoke_command( + package_name="my_package.my_module", class_name="MyService", function_name="_private_method", kwargs={}