from savcfg.bootstrap import get_savia_config_service, get_savia_config_editor
from savcfg.edit import ConfigEditor
from savcfg.read import ConfigService


def test_get_savia_config_service_from_production():
    assert type(get_savia_config_service("prod", "app")) is ConfigService
    assert type(get_savia_config_service("pre", "app")) is ConfigService
    assert type(get_savia_config_service("devel", "app")) is ConfigService


def test_get_savia_editor():
    assert type(get_savia_config_editor("prod")) is ConfigEditor
    assert type(get_savia_config_editor("pre")) is ConfigEditor
    assert type(get_savia_config_editor("devel")) is ConfigEditor
    assert type(get_savia_config_editor("common")) is ConfigEditor
