Skip to content

Move app tests into dedicated tests packages - #50

Merged
FriggemannMichael merged 1 commit into
mainfrom
refactor/tests-into-folders
Jul 8, 2026
Merged

Move app tests into dedicated tests packages#50
FriggemannMichael merged 1 commit into
mainfrom
refactor/tests-into-folders

Conversation

@FriggemannMichael

Copy link
Copy Markdown
Owner

Motivation

Mentor feedback: test modules should live in a dedicated tests/ package per app, not inside the api/ package (the api/ package should contain only API code). The core app already follows this layout with core/tests/.

Changes

  • Move each app's test modules from <app>/api/test_*.py into a new <app>/tests/ package (with __init__.py):
    • auth_app, offers_app, orders_app, profiles_app, reviews_app
  • Remove the empty default tests.py stubs (# Create your tests here.) from all five apps.

No test logic changed — files were moved verbatim (all imports are absolute, so no edits needed). pytest discovery (testpaths = ["."], test_*.py) and coverage omit (*/tests/*) already cover the new location.

Tests

179 passed, coverage 98.26%, ruff clean.

Relocate each app's test modules out of the api package into a
dedicated tests/ package and drop the empty default tests.py
stubs, mirroring the existing core/tests layout. Keeps the api
package focused on API code only.
@FriggemannMichael
FriggemannMichael merged commit e58966e into main Jul 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant