# Path: via/app.py
# def create_app(_=None, **settings):
#     """Configure and return the WSGI app."""
#     config = pyramid.config.Configurator(settings=load_settings(settings))
# 
#     config.include("pyramid_exclog")
#     config.include("pyramid_jinja2")
#     config.include("pyramid_services")
#     config.include("h_pyramid_sentry")
# 
#     config.include("via.views")
#     config.include("via.services")
# 
#     # Configure Pyramid so we can generate static URLs
#     static_path = str(importlib_resources.files("via") / "static")
#     cache_buster = PathCacheBuster(static_path)
#     print(f"Cache buster salt: {cache_buster.salt}")
# 
#     config.add_static_view(name="static", path="via:static")
#     config.add_cache_buster("via:static", cachebust=cache_buster)
# 
#     # Make the CheckmateClient object available as request.checkmate.
#     config.add_request_method(ViaCheckmateClient, reify=True, name="checkmate")
# 
#     config.add_tween("via.tweens.robots_tween_factory")
# 
#     # Add this as near to the end of your config as possible:
#     config.include("pyramid_sanity")
# 
#     app = WhiteNoise(
#         config.make_wsgi_app(),
#         index_file=True,
#         # Config for serving files at static/<salt>/path which are marked
#         # as immutable
#         root=static_path,
#         prefix=cache_buster.immutable_path,
#         immutable_file_test=cache_buster.get_immutable_file_test(),
#     )
# 
#     app.add_files(
#         # Config for serving files at / which are marked as mutable. This is
#         # for / -> index.html
#         root=static_path,
#         prefix="/",
#     )
# 
#     return app


import httpretty
import pytest
import webtest
from via.app import create_app



@pytest.fixture
def test_app(pyramid_settings):
    return webtest.TestApp(create_app(None, **pyramid_settings))


@pytest.fixture
def checkmate_pass(pyramid_settings):
    httpretty.register_uri(

# Path: via/app.py
# def create_app(_=None, **settings):
#     """Configure and return the WSGI app."""
#     config = pyramid.config.Configurator(settings=load_settings(settings))
# 
#     config.include("pyramid_exclog")
#     config.include("pyramid_jinja2")
#     config.include("pyramid_services")
#     config.include("h_pyramid_sentry")
# 
#     config.include("via.views")
#     config.include("via.services")
# 
#     # Configure Pyramid so we can generate static URLs
#     static_path = str(importlib_resources.files("via") / "static")
#     cache_buster = PathCacheBuster(static_path)
#     print(f"Cache buster salt: {cache_buster.salt}")
# 
#     config.add_static_view(name="static", path="via:static")
#     config.add_cache_buster("via:static", cachebust=cache_buster)
# 
#     # Make the CheckmateClient object available as request.checkmate.
#     config.add_request_method(ViaCheckmateClient, reify=True, name="checkmate")
# 
#     config.add_tween("via.tweens.robots_tween_factory")
# 
#     # Add this as near to the end of your config as possible:
#     config.include("pyramid_sanity")
# 
#     app = WhiteNoise(
#         config.make_wsgi_app(),
#         index_file=True,
#         # Config for serving files at static/<salt>/path which are marked
#         # as immutable
#         root=static_path,
#         prefix=cache_buster.immutable_path,
#         immutable_file_test=cache_buster.get_immutable_file_test(),
#     )
# 
#     app.add_files(
#         # Config for serving files at / which are marked as mutable. This is
#         # for / -> index.html
#         root=static_path,
#         prefix="/",
#     )
# 
#     return app


# Path: tests/functional/conftest.py
import httpretty
import pytest
import webtest
from via.app import create_app




@pytest.fixture
def test_app(pyramid_settings):
    return webtest.TestApp(create_app(None, **pyramid_settings))


@pytest.fixture
def checkmate_pass(pyramid_settings):
    httpretty.register_uri(

        httpretty.GET, "http://localhost:9099/api/check", status=204, body=""