From 2308c60fbe5437dbec8ba17921913381168e4273 Mon Sep 17 00:00:00 2001 From: Owen W. Taylor Date: Aug 03 2018 19:28:22 +0000 Subject: Fix a bad test teardown Calling .stop() on the mock object rather than the patcher left pyrpkg.log pointing to the mock object, which caused test_check_repo_has_namespace() to fail since it was expecting a particular message to be logged to stderr. Signed-off-by: Owen W. Taylor --- diff --git a/tests/test_cli.py b/tests/test_cli.py index c0e7f2c..5b7583f 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1603,7 +1603,7 @@ enabled = True def tearDown(self): if os.path.exists(self.osbs_repo_config): os.unlink(self.osbs_repo_config) - self.mock_log.stop() + self.log_patcher.stop() super(TestContainerBuildSetup, self).tearDown() def test_get_autorebuild_when_config_file_not_exists(self):