From dcbb0606e6109fc9083d2259f6bd5e6f3794dd18 Mon Sep 17 00:00:00 2001 From: Adam Moussa <166072409+amoussa1229@users.noreply.github.com> Date: Fri, 29 May 2026 14:30:44 -0400 Subject: [PATCH] Add pytest config and conftest for test discovery --- pyproject.toml | 3 +++ tests/conftest.py | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 pyproject.toml create mode 100644 tests/conftest.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d86f343 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[tool.pytest.ini_options] +testpaths = ["tests"] +pythonpath = ["lambdas/classifier", "lambdas/slack_post", "cdk"] diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..90357e0 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,13 @@ +"""Central test configuration. + +Sets dummy environment variables at import time so modules that read +``os.environ`` at module load (slackio, interactions, handler) can be imported +without real AWS credentials. Real values are monkeypatched per-test where +needed. +""" + +import os + +os.environ.setdefault("SLACK_SECRET_NAME", "test-slack-secret") +os.environ.setdefault("DASHBOARD_URL_PARAM", "/test/dashboard-url") +os.environ.setdefault("ANALYTICS_BUCKET", "test-bucket")