Added test cases to the test_posts to increase coverage for post_routes.
Test cases included:
Checking if the post was not found / does not exist (line 39).
Checking if a newly created post has the correct formatting (line 69).
Checking if a newly updated post has the correct formatting (line 135).
Portions of this code that utilized AI generation
ChatGPT aided me in making some of the tests for recipe_routes, and I was able to use the information I learned from that and apply it to test_routes to improve the coverage.
Screenshots (optional)
Original Coverage (85%)
New Coverage (88%)
How to Test
Start the Firebase Emulator
Comment out the @app.before_request line in the server.py file which runs the middleware
Run the run_tests.py test suite in the backend folder to run all test scripts and display a coverage report.
Checklist
[x] I have added/updated relevant documentation, and I have followed the coding style guidelines.
[x] I have added/updated tests, and I have run the test suite and improved the coverage.
[x] I have checked for any potential conflicts with other branches and fixed any merge conflicts.
Description / Changes Made
Portions of this code that utilized AI generation
Screenshots (optional)
Original Coverage (85%)![image](https://github.com/UNLV-CS472-672/2024-S-GROUP5-Munch/assets/107004966/9de0161f-9e4d-45e8-bee8-017a4f8951fd)
New Coverage (88%)![image](https://github.com/UNLV-CS472-672/2024-S-GROUP5-Munch/assets/107004966/b42d9b58-32f8-4263-972a-1744173354ea)
How to Test
Checklist