From 1b880165002b7eebf3d419211791fda701e3b0d7 Mon Sep 17 00:00:00 2001 From: Haibo Lin Date: May 19 2022 03:30:48 +0000 Subject: Fix tests for rhel 8 build - Stopping unstarted patcher raises exception in old version of mock and stopall() can avoid it - Limit version of Werkzeug JIRA: RHELCMP-9050 Signed-off-by: Haibo Lin --- diff --git a/server/requirements.txt b/server/requirements.txt index a7ea75b..5a13f25 100644 --- a/server/requirements.txt +++ b/server/requirements.txt @@ -19,3 +19,4 @@ koji python-ldap celery prometheus_client +Werkzeug <= 2.0.3 # Newer version dropped python3.6 support and removed a func needed by Flask-Login diff --git a/server/tests/test_pungi.py b/server/tests/test_pungi.py index 3afbe31..1349dbb 100644 --- a/server/tests/test_pungi.py +++ b/server/tests/test_pungi.py @@ -450,9 +450,7 @@ class TestPungi(ModelsBaseTest): def tearDown(self): super(TestPungi, self).tearDown() - self.patch_clone_repo.stop() - self.patch_makedirs.stop() - self.patch_ci_dump.stop() + patch.stopall() shutil.rmtree(self.compose.toplevel_dir)