Skip to content

Commit 5d560f0

Browse files
Merge branch 'master' into master
2 parents 654df7f + 598b74b commit 5d560f0

24 files changed

+92
-47
lines changed

backend/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ COPY ./scripts /app/scripts
3434
COPY ./pyproject.toml ./uv.lock ./alembic.ini /app/
3535

3636
COPY ./app /app/app
37+
COPY ./tests /app/tests
3738

3839
# Sync the project
3940
# Ref: https://docs.astral.sh/uv/guides/integration/docker/#intermediate-layers

backend/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ To test the backend run:
9797
$ bash ./scripts/test.sh
9898
```
9999

100-
The tests run with Pytest, modify and add tests to `./backend/app/tests/`.
100+
The tests run with Pytest, modify and add tests to `./backend/tests/`.
101101

102102
If you use GitHub Actions the tests will run automatically.
103103

backend/app/core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
def parse_cors(v: Any) -> list[str] | str:
1919
if isinstance(v, str) and not v.startswith("["):
20-
return [i.strip() for i in v.split(",")]
20+
return [i.strip() for i in v.split(",") if i.strip()]
2121
elif isinstance(v, list | str):
2222
return v
2323
raise ValueError(v)

backend/scripts/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
set -e
44
set -x
55

6-
coverage run -m pytest
6+
coverage run -m pytest tests/
77
coverage report
88
coverage html --title "${@-coverage}"
File renamed without changes.
File renamed without changes.
File renamed without changes.

backend/app/tests/api/routes/test_items.py renamed to backend/tests/api/routes/test_items.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from sqlmodel import Session
55

66
from app.core.config import settings
7-
from app.tests.utils.item import create_random_item
7+
from tests.utils.item import create_random_item
88

99

1010
def test_create_item(

backend/app/tests/api/routes/test_login.py renamed to backend/tests/api/routes/test_login.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
from app.core.security import verify_password
88
from app.crud import create_user
99
from app.models import UserCreate
10-
from app.tests.utils.user import user_authentication_headers
11-
from app.tests.utils.utils import random_email, random_lower_string
1210
from app.utils import generate_password_reset_token
11+
from tests.utils.user import user_authentication_headers
12+
from tests.utils.utils import random_email, random_lower_string
1313

1414

1515
def test_get_access_token(client: TestClient) -> None:
File renamed without changes.

0 commit comments

Comments
 (0)