Skip to content

Commit 67cccd4

Browse files
test: Added unit test for backend
2 parents 3efb1e7 + 9dd1eac commit 67cccd4

File tree

12 files changed

+9170
-0
lines changed

12 files changed

+9170
-0
lines changed

content-gen/src/backend/requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
pytest>=8.0.0
77
pytest-asyncio>=0.23.0
88
pytest-cov>=5.0.0
9+
pytest-mock>=3.14.0
910

1011
# Code Quality
1112
black>=24.0.0

content-gen/src/pytest.ini

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
[pytest]
2+
# Pytest configuration for backend tests
3+
4+
# Test discovery patterns
5+
python_files = test_*.py
6+
python_classes = Test*
7+
python_functions = test_*
8+
9+
# Asyncio configuration
10+
asyncio_mode = auto
11+
12+
# Output configuration
13+
addopts =
14+
-v
15+
--strict-markers
16+
--tb=short
17+
--cov=backend
18+
--cov-report=term-missing
19+
--cov-report=html:coverage_html
20+
--cov-report=xml:coverage.xml
21+
--cov-fail-under=20
22+
23+
# Filter warnings
24+
filterwarnings =
25+
ignore::DeprecationWarning
26+
ignore::PendingDeprecationWarning
27+
ignore:Unclosed client session:ResourceWarning
28+
ignore:Unclosed connector:ResourceWarning
29+
30+
# Test paths
31+
testpaths = tests
32+
33+
# Coverage configuration
34+
[coverage:run]
35+
source = backend
36+
omit =
37+
tests/*
38+
*/tests/*
39+
*/test_*
40+
*/__pycache__/*
41+
*/site-packages/*
42+
conftest.py
43+
*/hypercorn.conf.py
44+
*/ApiApp.Dockerfile
45+
*/WebApp.Dockerfile
46+
47+
[coverage:report]
48+
exclude_lines =
49+
pragma: no cover
50+
def __repr__
51+
raise AssertionError
52+
raise NotImplementedError
53+
if __name__ == "__main__":
54+
if TYPE_CHECKING:
55+
@abstract

0 commit comments

Comments
 (0)