mirror of
https://github.com/enpaul/kodak.git
synced 2024-11-14 18:46:50 +00:00
21 lines
499 B
Python
21 lines
499 B
Python
|
import importlib.resources
|
||
|
|
||
|
import openapi_spec_validator
|
||
|
import ruamel.yaml
|
||
|
|
||
|
from imagemuck import __about__
|
||
|
|
||
|
|
||
|
yaml = ruamel.yaml.YAML(typ="safe") # pylint: disable=invalid-name
|
||
|
|
||
|
|
||
|
def test_openapi():
|
||
|
openapi_spec_validator.validate_spec(
|
||
|
yaml.load(importlib.resources.read_text("imagemuck", "openapi.yaml"))
|
||
|
)
|
||
|
|
||
|
|
||
|
def test_openapi_version():
|
||
|
spec = yaml.load(importlib.resources.read_text("imagemuck", "openapi.yaml"))
|
||
|
assert spec["info"]["version"] == __about__.__version__
|