[GH-ISSUE #8] Setup pytest for backend #7

Closed
opened 2026-02-27 19:16:28 +03:00 by kerem · 1 comment
Owner

Originally created by @EddieTheCubeHead on GitHub (Jan 17, 2024).
Original GitHub issue: https://github.com/EddieTheCubeHead/Stagnum/issues/8

Setup backend testing using pytest.

Replace normal naming standards with the following pytest.ini -file:

[pytest]
asyncio_mode=auto
python_files = *_features.py
python_classes = *Features
python_functions = should_*

Create two preliminary fixtures:

  • A fixture providing a db connection. This connection uses in-memory SQLite instead of PostgreSQL
  • A fixture providing our REST client. This fixture uses the db connection fixture.

Acceptance criteria: backend has a pytest test set and aforementioned fixtures. Root route (hello world-return) is tested.

Originally created by @EddieTheCubeHead on GitHub (Jan 17, 2024). Original GitHub issue: https://github.com/EddieTheCubeHead/Stagnum/issues/8 Setup backend testing using pytest. Replace normal naming standards with the following pytest.ini -file: ``` [pytest] asyncio_mode=auto python_files = *_features.py python_classes = *Features python_functions = should_* ``` Create two preliminary fixtures: - A fixture providing a db connection. This connection uses in-memory SQLite instead of PostgreSQL - A fixture providing our REST client. This fixture uses the db connection fixture. Acceptance criteria: backend has a pytest test set and aforementioned fixtures. Root route (hello world-return) is tested.
kerem closed this issue 2026-02-27 19:16:28 +03:00
Author
Owner

@EddieTheCubeHead commented on GitHub (Jan 24, 2024):

Doing this with ticket #7 as the ticket proved to be pretty light on code and has no verifiable functionality changes without tests

<!-- gh-comment-id:1908771628 --> @EddieTheCubeHead commented on GitHub (Jan 24, 2024): Doing this with ticket #7 as the ticket proved to be pretty light on code and has no verifiable functionality changes without tests
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Stagnum#7
No description provided.