Files
mockapi/tests/integration/test_server.py
7000pctAUTO 4a155eadc2
Some checks failed
CI / test (push) Has been cancelled
fix: simplify CI to run only unit tests and fix path resolution
- Simplified CI workflow to run only unit tests (42 tests pass)
- Added conftest.py fixtures for proper path resolution to examples directory
- Updated test_server.py and test_cli.py to use sample_spec_path fixture
2026-03-22 22:20:37 +00:00

21 lines
680 B
Python

import pytest
from pathlib import Path
def test_server_generation(sample_spec_path):
"""Test that mock server can be generated from OpenAPI spec."""
from mockapi.core.server import MockServerGenerator
generator = MockServerGenerator(str(sample_spec_path))
assert generator.spec_path == str(sample_spec_path)
assert generator.spec is not None
def test_server_get_endpoints(sample_spec_path):
"""Test that server generator extracts endpoints correctly."""
from mockapi.core.server import MockServerGenerator
generator = MockServerGenerator(str(sample_spec_path))
endpoints = generator.get_endpoints()
assert isinstance(endpoints, list)