mirror of
https://github.com/nikdoof/pydantic_spaceapi.git
synced 2025-12-13 22:42:18 +00:00
Add basic tests framework
This commit is contained in:
17
tests/test_v13.py
Normal file
17
tests/test_v13.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import pytest
|
||||
import json
|
||||
import pathlib
|
||||
from pydantic_spaceapi.v13 import SpaceAPIv13Model
|
||||
|
||||
@pytest.fixture
|
||||
def valid_v13():
|
||||
file = pathlib.Path("tests/examples/valid_v13.json")
|
||||
with open(file) as f:
|
||||
return json.loads(f.read())
|
||||
|
||||
def test_working(valid_v13):
|
||||
"""
|
||||
Check that we can parse a valid v13 definition
|
||||
"""
|
||||
obj = SpaceAPIv13Model(**valid_v13)
|
||||
assert isinstance(obj, SpaceAPIv13Model)
|
||||
Reference in New Issue
Block a user