Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test-frontend:
docker-compose exec frontend sh -c "cd /usr/src/app/frontend && CI=true npm test"

test-backend:
docker-compose exec backend sh -c "python -m unittest discover tests/backend"
docker-compose exec tm-backend sh -c "pytest tests/api -p no:warnings"

fetch:
ifndef PRNUMBER
Expand Down
2 changes: 1 addition & 1 deletion docs/developers/development-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ The project includes a suite of Unit and Integration tests that you
should run after any changes.

```
python3 -m unittest discover tests/backend
pytest tests/api
```
or
```
Expand Down
4 changes: 2 additions & 2 deletions docs/developers/submit-pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ mode for more than a short time runs the risk of being ignored.
The backend has unit tests which can be run manually. These are the
same tests the CI support runs. To run all the tests, do this:

python3 -m unittest discover ./tests
pytest tests/api

To run a specific test case, you can do it like this:

python -m unittest tests/backend/integration/services/test_license_service.py
pytest tests/api/integration/services/test_license_service.py

Whenever you add a new endpoint in the backend, you should add a test
case for it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from backend.models.postgis.project import ProjectInfo, Project
from backend.models.dtos.project_dto import ProjectSearchBBoxDTO
from backend.models.postgis.user import User
from tests.backend.helpers.test_helpers import get_canned_json
from tests.api.helpers.test_helpers import get_canned_json
from unittest.mock import patch, MagicMock, AsyncMock
from shapely.geometry import Polygon, box
import shapely.wkt
Expand Down
2 changes: 1 addition & 1 deletion tests/api/unit/services/users/test_osm_service.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from backend.services.users.osm_service import OSMService, OSMServiceError
from tests.backend.helpers.test_helpers import get_canned_osm_user_json_details
from tests.api.helpers.test_helpers import get_canned_osm_user_json_details


class TestOsmService:
Expand Down
Empty file removed tests/backend/__init__.py
Empty file.
107 changes: 0 additions & 107 deletions tests/backend/base.py

This file was deleted.

Empty file removed tests/backend/helpers/__init__.py
Empty file.
37 changes: 0 additions & 37 deletions tests/backend/helpers/test_files/2d_multi_polygon.json

This file was deleted.

1 change: 0 additions & 1 deletion tests/backend/helpers/test_files/CHAI-Escuintla-West2.json

This file was deleted.

85 changes: 0 additions & 85 deletions tests/backend/helpers/test_files/canned_draft_project.json

This file was deleted.

56 changes: 0 additions & 56 deletions tests/backend/helpers/test_files/canned_kml_project.json

This file was deleted.

Loading