Compare commits

...

2 Commits

Author SHA1 Message Date
Eugene Yurtsev eee5b7e96e Merge branch 'main' into add-playground-test 2024-04-01 12:52:16 -04:00
StreetLamb 81aa1b1f6e Add check for valid playground assets path in playground tests 2024-04-02 00:00:53 +08:00
+6
View File
@@ -45,6 +45,9 @@ async def test_serve_playground_with_api_router() -> None:
async with AsyncClient(app=app, base_url="http://localhost:9999") as client:
response = await client.get("/langserve_runnables/chat/playground/index.html")
assert response.status_code == 200
assert (
'src="/langserve_runnables/chat/playground/assets/' in response.content.decode()
), "html should contain reference to valid playground assets path"
async def test_serve_playground_with_api_router_in_api_router() -> None:
@@ -67,6 +70,9 @@ async def test_serve_playground_with_api_router_in_api_router() -> None:
async with AsyncClient(app=app, base_url="http://localhost:9999") as client:
response = await client.get("/parent/bar/foo/playground/index.html")
assert response.status_code == 200
assert (
'src="/parent/bar/foo/playground/assets/' in response.content.decode()
), "html should contain reference to valid playground assets path"
async def test_root_path_on_playground() -> None: