-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### TL;DR This PR adds priority field validation for SiteMapUrl in the sitemapr module, including corresponding exception handling and tests for invalid values. ### What changed? - Added `SiteMaprException` and `InvalidSiteMapPriority` in `sitemapr.exceptions`. - Added priority validation in `SiteMapUrl` model (with corresponding validator). - Added unit tests for the newly added validation logic in `tests/test_core.py`. - .gitignore now tracks the .python-version file. ### How to test? - Run `pytest` to ensure all test cases, especially the new ones for priority validation, pass successfully. ### Why make this change? - Adding priority validation ensures that the priority values are within the acceptable range (0.0 to 1.0), thus maintaining data integrity.
- Loading branch information
Showing
3 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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