From 8d3b8c0c4ac845836b256254b208edf9e512f7b8 Mon Sep 17 00:00:00 2001 From: Rob van der Linde Date: Fri, 8 Mar 2024 12:32:33 +1300 Subject: [PATCH] tests: add settings pytest fixture also there is no need to do anything in the app fixture so move import back up --- tests/conftest.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index d661efd..691ecf8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,15 +2,18 @@ import webtest from pyramid.scripting import prepare +import sambal + @pytest.fixture(scope="session") -def app(): - """Fixtures that returns the Sambal WSGI app. +def settings(): + """Fixture that returns the Pyramid settings dict.""" + return sambal.SETTINGS - We can inject env vars here if necessary, but only before the import. - """ - import sambal +@pytest.fixture(scope="session") +def app(): + """Fixtures that returns the Sambal WSGI app.""" return sambal.app