Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
axiomofjoy committed Jan 29, 2025
1 parent 25dfb11 commit f74cf6e
Showing 1 changed file with 31 additions and 5 deletions.
36 changes: 31 additions & 5 deletions tests/unit/server/api/mutations/test_prompt_mutations.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,10 +491,22 @@ async def test_create_chat_prompt_fails_on_name_conflict(
"invocationParameters": {"temperature": 0.4},
"modelProvider": "openai",
"modelName": "o1-mini",
"outputSchema": { # invalid jsonschema
"outputSchema": {
"definition": {
"type": "invalid_jsonschema_type",
},
"type": "json_schema",
"json_schema": {
"name": "response",
"schema": {
"type": "invalid_type", # valid schema other than this
"properties": {
"foo": {"type": "string"},
},
"required": ["foo"],
"additionalProperties": False,
},
"strict": True,
},
}
},
},
}
Expand Down Expand Up @@ -951,8 +963,22 @@ async def test_create_chat_prompt_version_fails_with_nonexistent_prompt_id(
"invocationParameters": {"temperature": 0.4},
"modelProvider": "openai",
"modelName": "o1-mini",
"outputSchema": { # invalid jsonschema type
"definition": {"type": "invalid_jsonschema_type"},
"outputSchema": {
"definition": {
"type": "json_schema",
"json_schema": {
"name": "response",
"schema": {
"type": "invalid_type", # valid schema other than this
"properties": {
"foo": {"type": "string"},
},
"required": ["foo"],
"additionalProperties": False,
},
"strict": True,
},
}
},
},
}
Expand Down

0 comments on commit f74cf6e

Please sign in to comment.