Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
axiomofjoy committed Feb 1, 2025
1 parent e245910 commit b5af4b7
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 @@ -504,10 +504,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 @@ -974,8 +986,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 b5af4b7

Please sign in to comment.