Skip to content

v2.7.1

Compare
Choose a tag to compare
@marcuxyz marcuxyz released this 12 Nov 18:21
· 6 commits to main since this release
d1262ef

What's Changed

  • Create a documentation for MVC-Flask by @marcuxyz in #39
  • Refactor the code, create documentation to code, and update tests by @marcuxyz in #43

Description

Test Improvements and Refactoring:
New test cases were added to validate the registration of blueprints, routes, endpoints, and HTTP verbs​​.
The tests in routes_test.py were refactored for better readability and maintainability. This included removing unused properties and simplifying tests by directly comparing expected and actual blueprints, routes, and methods​​.

Version Update and Tests:
The package version was updated from 2.5.0 to 2.7.0, with a corresponding unit test added to verify this change​​.

Test Setup and File Management:
A conftest.py file was added for test fixtures and client setup, replacing the fixtures.py file. Additionally, the messages_endpoint_test.py file was added for testing message endpoints, while the request_test.py file was removed​​.

Makefile and Dependency Updates:
The Makefile was updated to use pytest instead of ward and to change the line length limit to 89 characters for consistency. Flask-SQLAlchemy and pytest were added as dev dependencies​​.

Router Class Addition:
A Router class was added to manage different HTTP routes (GET, POST, PUT, DELETE) for the application's controllers and actions​​.

Additional Test Cases and Cleanup:
New tests were added for checking blueprints registration, message routes, and endpoints. Unnecessary blank lines were removed to improve code readability. Tests were also added to ensure proper registration of routes and methods count​​​​​​.

HTTP Method Override Functionality:
The http_method_override.py file was added to handle HTTP method override functionality with new HTTPMethodOverrideMiddleware and CustomRequest classes​​.

Controller and Route Management:
The messages_controller.py was refactored to handle both JSON and form data for updating message titles. Unused methods and files in the controllers were removed, and new methods were added to improve code organization and readability​​​​.

Full Changelog: v2.7.0...v2.7.1