Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit 99d15de

Browse files
fix: Update test
1 parent 878f6c0 commit 99d15de

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/_sync/test_function_client.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from httpx import Response
44
from jwt import encode
55

6+
from supabase_functions import FunctionRegion
67
from supabase_functions.errors import FunctionsHttpError, FunctionsRelayError
78

89
from .clients import (
@@ -40,6 +41,18 @@ def test_invoke():
4041
assert route.called
4142

4243

44+
def test_invoke_region():
45+
with respx.mock:
46+
route = respx.post(f"{FUNCTIONS_URL}/hello-world").mock(
47+
return_value=Response(200)
48+
)
49+
function_client().invoke(
50+
function_name="hello-world",
51+
invoke_options={"region": FunctionRegion("us-west-2")},
52+
)
53+
assert route.called
54+
55+
4356
def test_invoke_with_json_response():
4457
with respx.mock:
4558
route = respx.post(f"{FUNCTIONS_URL}/hello-world").mock(

0 commit comments

Comments
 (0)