We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3173e95 commit 662e8baCopy full SHA for 662e8ba
src/server/api/tests/test_api.py
@@ -604,3 +604,28 @@ async def test_api_event_search(
604
d = response.json()
605
assert response.status_code == 200
606
assert d["errno"] == 0
607
+
608
609
+@pytest.mark.asyncio
610
+async def test_api_non_uuid_access(client, db_env):
611
612
+ fake_uid = "fake"
613
614
+ response = client.post(
615
+ f"{PREFIX}/blobs/insert/{fake_uid}",
616
+ json={
617
+ "blob_type": "chat",
618
+ "blob_data": {
619
+ "messages": [
620
+ {"role": "user", "content": "hello, I'm Gus"},
621
+ {"role": "assistant", "content": "hi"},
622
+ ]
623
+ },
624
625
+ )
626
+ assert response.status_code == 422
627
628
+ response = client.get(
629
+ f"{PREFIX}/users/{fake_uid}",
630
631
0 commit comments