From 5a16a23fcb279677a9c8eaa3babda2c143dd3082 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Sun, 22 Mar 2026 22:17:17 +0000 Subject: [PATCH] Fix test_server.py to use sample_spec_path fixture --- tests/integration/test_server.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/integration/test_server.py b/tests/integration/test_server.py index f408ee1..33e0aa9 100644 --- a/tests/integration/test_server.py +++ b/tests/integration/test_server.py @@ -8,16 +8,13 @@ from mockapi.core.server_generator import MockServerGenerator from mockapi.core.config import Config -SAMPLE_SPEC_PATH = "examples/petstore.yaml" - - class TestMockServerIntegration: """Integration tests for mock server.""" @pytest.fixture - def sample_spec(self): + def sample_spec(self, sample_spec_path): """Load sample OpenAPI spec.""" - loader = SpecLoader(SAMPLE_SPEC_PATH) + loader = SpecLoader(sample_spec_path) return loader.load() @pytest.fixture @@ -67,4 +64,4 @@ class TestMockServerIntegration: assert len(schemas) > 0 assert "User" in schemas assert "Product" in schemas - assert "Order" in schemas + assert "Order" in schemas \ No newline at end of file