From cc4b06f402bd653f30a1097e328e6c5e521f6be1 Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Apr 14 2018 01:36:21 +0000 Subject: Fix test test_verify_sls_invalid_date Original test has a real valid eol date for bug_fixes. In utils.verify_sls, security_fixes and bug_fixes are iterated over to check the eol dates, but dict.items() iterates over in arbitrary order. So, when the valid bug_fixes eol date is handled, utils.verify_sls will continue to query PDC with the fake URL. This patch passes each invalid eol date to both security_fixes and bug_fixes to ensure utils.verify_sls raises expected error. Fixes #209 Signed-off-by: Chenxiong Qi --- diff --git a/test/test_utils.py b/test/test_utils.py index 60cbf6c..0bf1bf3 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -108,7 +108,7 @@ class TestUtils(CliTestCase): """ for eol in ['2030-01-01', '2030-12-25']: try: - sls = {'security_fixes': eol, 'bug_fixes': '2030-12-01'} + sls = {'security_fixes': eol, 'bug_fixes': eol} utils.verify_sls('http://pdc.example.com/', sls) assert False, 'An rpkgError exception was not raised' except rpkgError as e: