Skip to content

Commit 988c45e

Browse files
committed
Test that names are correct
1 parent 2677658 commit 988c45e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/test_full.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ def test_simple_end_to_end(self):
5959
def my_function(name: str) -> str:
6060
return f"Hello world: {name}"
6161

62+
call = my_function.build_call(52)
63+
self.assertEqual(call.function.split(".")[-1], "my_function")
64+
6265
# The client.
6366
[dispatch_id] = self.dispatch_client.dispatch([my_function.build_call(52)])
6467

@@ -73,10 +76,13 @@ def my_function(name: str) -> str:
7376

7477
def test_simple_missing_signature(self):
7578
@self.dispatch.function
76-
def my_function(name: str) -> str:
79+
async def my_function(name: str) -> str:
7780
return f"Hello world: {name}"
7881

79-
[dispatch_id] = self.dispatch_client.dispatch([my_function.build_call(52)])
82+
call = my_function.build_call(52)
83+
self.assertEqual(call.function.split(".")[-1], "my_function")
84+
85+
[dispatch_id] = self.dispatch_client.dispatch([call])
8086

8187
self.dispatch_service.endpoint_client = EndpointClient.from_app(
8288
self.endpoint_app

0 commit comments

Comments
 (0)