From 4b6d6bb40a075aa1c70a7ccb6f2aaa2d6eecf01b Mon Sep 17 00:00:00 2001 From: scosman Date: Tue, 3 Sep 2024 20:57:36 -0400 Subject: [PATCH] Improve naming to avoid pytest conventions --- libs/core/kiln_ai/datamodel/test_json_schema.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/core/kiln_ai/datamodel/test_json_schema.py b/libs/core/kiln_ai/datamodel/test_json_schema.py index 91c05b4..ed3185e 100644 --- a/libs/core/kiln_ai/datamodel/test_json_schema.py +++ b/libs/core/kiln_ai/datamodel/test_json_schema.py @@ -3,7 +3,7 @@ from pydantic import BaseModel -class TestJsonSchema(BaseModel): +class ExampleModel(BaseModel): x_schema: JsonObjectSchema | None = None @@ -43,7 +43,7 @@ class TestJsonSchema(BaseModel): def test_json_schema(): - o = TestJsonSchema(x_schema=json_joke_schema) + o = ExampleModel(x_schema=json_joke_schema) parsed_schema = schema_from_json_str(o.x_schema) assert parsed_schema is not None assert parsed_schema["type"] == "object" @@ -54,8 +54,8 @@ def test_json_schema(): # Not json schema with pytest.raises(ValueError): - o = TestJsonSchema(x_schema="hello") + o = ExampleModel(x_schema="hello") with pytest.raises(ValueError): - o = TestJsonSchema(x_schema="{'asdf':{}}") + o = ExampleModel(x_schema="{'asdf':{}}") with pytest.raises(ValueError): - o = TestJsonSchema(x_schema="{asdf") + o = ExampleModel(x_schema="{asdf")