mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-12-04 23:44:05 +03:00
20 lines
428 B
Python
20 lines
428 B
Python
|
"""Fixtures module."""
|
||
|
|
||
|
from dependency_injector import providers
|
||
|
from pytest import fixture
|
||
|
|
||
|
|
||
|
@fixture
|
||
|
def config_type():
|
||
|
return "default"
|
||
|
|
||
|
|
||
|
@fixture
|
||
|
def config(config_type):
|
||
|
if config_type == "strict":
|
||
|
return providers.Configuration(strict=True)
|
||
|
elif config_type == "default":
|
||
|
return providers.Configuration()
|
||
|
else:
|
||
|
raise ValueError("Undefined config type \"{0}\"".format(config_type))
|