[PR #38] [MERGED] 7 create sqlalchemy connection for backend and 8 setup pytest for backend #250

Closed
opened 2026-02-27 19:17:27 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/EddieTheCubeHead/Stagnum/pull/38
Author: @EddieTheCubeHead
Created: 1/24/2024
Status: Merged
Merged: 1/25/2024
Merged by: @EddieTheCubeHead

Base: masterHead: 7-create-sqlalchemy-connection-for-backend


📝 Commits (6)

  • a9005cc 7 add sqlalchemy connection base
  • c7754c3 7 add pytest and tests for sqlalchemy connection and fastapi server
  • caf7de3 7 rename db connection file
  • 3eb50a7 7 update docs and add pythonpath to pytest.ini so tests can be run outside of PycharmIDE
  • e4e3af2 7 line change at file end
  • 1c54873 7 specify test command running locations in server README

📊 Changes

9 files changed (+113 additions, -2 deletions)

View changed files

📝 server/README.md (+17 -0)
server/pytest.ini (+5 -0)
📝 server/requirements.txt (+2 -1)
📝 server/src/api/routes.py (+1 -1)
server/src/database/__init__.py (+0 -0)
server/src/database/database_connection.py (+30 -0)
server/test/conftest.py (+15 -0)
server/test/framework_features.py (+37 -0)
server/test_requirements.txt (+6 -0)

📄 Description

Combined the tickets as SQLAlchemy was dead code without tests.

  • Added sqlalchemy connection manager with configurable connection string in src/database/database_connection
  • Added pytest.ini to configure pytest with initial configuration values
  • Added test/conftest to house pytest fixtures
    • Added fixtures for database client and test server
  • Added framework_features -feature test file to host tests that validate framework functionality
    • Added tests for FastAPI root route and SQLAlchemy client basic functionality in here
  • Added documentation for running tests locally
  • Added test_requirements.txt to separate functionally required packages from packages required to run test set

Closing this also closes #8


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/EddieTheCubeHead/Stagnum/pull/38 **Author:** [@EddieTheCubeHead](https://github.com/EddieTheCubeHead) **Created:** 1/24/2024 **Status:** ✅ Merged **Merged:** 1/25/2024 **Merged by:** [@EddieTheCubeHead](https://github.com/EddieTheCubeHead) **Base:** `master` ← **Head:** `7-create-sqlalchemy-connection-for-backend` --- ### 📝 Commits (6) - [`a9005cc`](https://github.com/EddieTheCubeHead/Stagnum/commit/a9005cc4d9fe92aaa7f11b1c3889fbdde683777c) 7 add sqlalchemy connection base - [`c7754c3`](https://github.com/EddieTheCubeHead/Stagnum/commit/c7754c39ff48833c648e5e21337d9f7b3a5db638) 7 add pytest and tests for sqlalchemy connection and fastapi server - [`caf7de3`](https://github.com/EddieTheCubeHead/Stagnum/commit/caf7de3c7ce3afec7df60bab311f56ac401d1a23) 7 rename db connection file - [`3eb50a7`](https://github.com/EddieTheCubeHead/Stagnum/commit/3eb50a78fc89beda19729672bd7f2d0aaa932549) 7 update docs and add pythonpath to pytest.ini so tests can be run outside of PycharmIDE - [`e4e3af2`](https://github.com/EddieTheCubeHead/Stagnum/commit/e4e3af2d90d775ea665cefba65837ff5fd3ee720) 7 line change at file end - [`1c54873`](https://github.com/EddieTheCubeHead/Stagnum/commit/1c5487369260bf513b215a93c5d5d00f505c6fe1) 7 specify test command running locations in server README ### 📊 Changes **9 files changed** (+113 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `server/README.md` (+17 -0) ➕ `server/pytest.ini` (+5 -0) 📝 `server/requirements.txt` (+2 -1) 📝 `server/src/api/routes.py` (+1 -1) ➕ `server/src/database/__init__.py` (+0 -0) ➕ `server/src/database/database_connection.py` (+30 -0) ➕ `server/test/conftest.py` (+15 -0) ➕ `server/test/framework_features.py` (+37 -0) ➕ `server/test_requirements.txt` (+6 -0) </details> ### 📄 Description Combined the tickets as SQLAlchemy was dead code without tests. - Added sqlalchemy connection manager with configurable connection string in src/database/database_connection - Added pytest.ini to configure pytest with initial configuration values - Added test/conftest to house pytest fixtures - Added fixtures for database client and test server - Added framework_features -feature test file to host tests that validate framework functionality - Added tests for FastAPI root route and SQLAlchemy client basic functionality in here - Added documentation for running tests locally - Added test_requirements.txt to separate functionally required packages from packages required to run test set Closing this also closes #8 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 19:17:27 +03:00
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#250
No description provided.