mirror of
https://github.com/Sea-Haven-Industries/apm-wo-analysis.git
synced 2026-10-06 22:52:02 +00:00
Add pytest config and conftest for test discovery
This commit is contained in:
parent
54ef5400b1
commit
dcbb0606e6
2 changed files with 16 additions and 0 deletions
3
pyproject.toml
Normal file
3
pyproject.toml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[tool.pytest.ini_options]
|
||||||
|
testpaths = ["tests"]
|
||||||
|
pythonpath = ["lambdas/classifier", "lambdas/slack_post", "cdk"]
|
||||||
13
tests/conftest.py
Normal file
13
tests/conftest.py
Normal file
|
|
@ -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")
|
||||||
Loading…
Add table
Reference in a new issue