From d57dfd4d36daa3d356d0709018a4821de158e099 Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Tue, 20 Jul 2021 14:13:07 -0700 Subject: [PATCH] PackageBase: test Popularity conversion Signed-off-by: Kevin Morris --- test/test_package_base.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test_package_base.py b/test/test_package_base.py index 7f608c2c..0c0d0526 100644 --- a/test/test_package_base.py +++ b/test/test_package_base.py @@ -36,6 +36,11 @@ def test_package_base(): assert pkgbase.SubmittedTS > 0 assert pkgbase.ModifiedTS > 0 + # Set Popularity to a string, then get it by attribute to + # exercise the string -> float conversion path. + pkgbase.Popularity = "0.0" + assert pkgbase.Popularity == 0.0 + def test_package_base_ci(): """ Test case insensitivity of the database table. """