File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1488,11 +1488,16 @@ def f(a: int) -> list[str]: ...
1488
1488
def test_function_data_format_compatibility (client , servicer ):
1489
1489
app = App ("app" )
1490
1490
1491
- @app .function (name = "f" , serialized = True )
1491
+ @app .function (serialized = True )
1492
1492
def f (a : int ) -> list [str ]: ...
1493
1493
1494
+ @app .function (serialized = True )
1495
+ @modal .fastapi_endpoint ()
1496
+ def web_f (a : int ) -> list [str ]: ...
1497
+
1494
1498
deploy_app (app , client = client )
1495
1499
assert set (f ._get_metadata ().data_format_compatibility ) == {api_pb2 .DATA_FORMAT_PICKLE , api_pb2 .DATA_FORMAT_CBOR }
1500
+ assert set (web_f ._get_metadata ().data_format_compatibility ) == {api_pb2 .DATA_FORMAT_ASGI }
1496
1501
1497
1502
1498
1503
@pytest .mark .usefixtures ("set_env_client" )
You can’t perform that action at this time.
0 commit comments