Implement Pytest automation tests and GitHub workflow#21
Merged
Conversation
…ion feature to app.py; Created .env file with placeholder values
… single quotes to double quotes in json responses in auth_routes.py; removed my .env from remote repo and altered gitignore so it won't get pushed again; Removed one unnecessary import from app.py and moved the other one to the top of the file
Signed-off-by: Aleksandar Karastoyanov <a.karastoyanov@utp.bg>
Signed-off-by: Aleksandar Karastoyanov <a.karastoyanov@utp.bg>
- Improved errors handling - Fixed UsersStats class and relations Signed-off-by: Aleksandar Karastoyanov <a.karastoyanov@utp.bg>
Signed-off-by: Aleksandar Karastoyanov <a.karastoyanov@utp.bg>
Signed-off-by: Aleksandar Karastoyanov <a.karastoyanov@utp.bg>
Signed-off-by: Aleksandar Karastoyanov <a.karastoyanov@utp.bg>
- modified dir structure - add pytest and flask-pytest libs - introduce backend test with dummy data Signed-off-by: Aleksandar Karastoyanov <a.karastoyanov@utp.bg>
Signed-off-by: Aleksandar Karastoyanov <a.karastoyanov@utp.bg>
Signed-off-by: Aleksandar Karastoyanov <a.karastoyanov@utp.bg>
Signed-off-by: Aleksandar Karastoyanov <a.karastoyanov@utp.bg>
Signed-off-by: Aleksandar Karastoyanov <a.karastoyanov@utp.bg>
Signed-off-by: Aleksandar Karastoyanov <a.karastoyanov@utp.bg>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
This PR adds automated testing for the backend:
• Adds pytest setup with fixtures for Flask app and in-memory SQLite database.
• Creates dummy JSON test data for /register route scenarios (valid registration, weak passwords, missing fields, duplicate usernames).
• Adds Pytest tests covering registration functionality to ensure backend correctness.
• Implements a GitHub Actions workflow that runs all backend tests on every pull request to master, enforcing CI/CD best practices.
🔗 Linked Issue (Required)
Closes: #13
🧪 Testing
pytest -v # Needs to be executed from backend/ directory🎓 Learning Reflection
📸 Screenshots / Logs (if applicable)