
import kheops.app as Kheops



def test_app_config():

    # Testing missing namespace
    for namespace in ['missing', '_weird_key' ]:
        try:
            config= 'examples/kheops.yml'
            Kheops.Kheops(config=config, namespace=namespace)
            assert False
        except Exception:
            assert True

    # Testing unexisting config files
    namespace = 'default'
    for config in ['toto.yaml', 'toto.noext']:
        try:
            Kheops.Kheops(config=config, namespace=namespace)
            assert False
        except Exception:
            assert True



