mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-09-07 01:09:55 +00:00
* add config validator subcommand * add --exit-code flag * docs & faq update
20 lines
514 B
Python
20 lines
514 B
Python
import pytest
|
|
|
|
from ahriman.core.configuration import Configuration
|
|
from ahriman.core.configuration.schema import CONFIGURATION_SCHEMA
|
|
from ahriman.core.configuration.validator import Validator
|
|
|
|
|
|
@pytest.fixture
|
|
def validator(configuration: Configuration) -> Validator:
|
|
"""
|
|
fixture for validator
|
|
|
|
Args:
|
|
configuration(Configuration): configuration fixture
|
|
|
|
Returns:
|
|
Validator: validator test instance
|
|
"""
|
|
return Validator(instance=configuration, schema=CONFIGURATION_SCHEMA)
|