Verified Commit 1a61c3d1 authored by David Runge's avatar David Runge
Browse files

Add first validators to models

repo_management/models.py:
Add validators to the `BuildDate`, `CSize`, `ISize`, `Name` and
`Version` models to ensure positive integers, correct names and
versions.
Add the comparator instance methods `Version.is_older_than()` and
`Version.is_newer_than()` which rely on pyalpm's `vercmp()` to compare
two version strings and return whether they are older or newer
(respectively).
Update the documentation for `ISize` to reflect, that it represents size
of an installed package.

tests/test_models.py:
Add tests for added validators and comparator methods.
parent 64bd6e25
Pipeline #5872 passed with stage
in 6 minutes and 20 seconds