diff --git a/tests/test_builder/test_build_notification.py b/tests/test_builder/test_build_notification.py index 945292bc..f525461a 100644 --- a/tests/test_builder/test_build_notification.py +++ b/tests/test_builder/test_build_notification.py @@ -106,4 +106,4 @@ class TestBuildNotification(unittest.TestCase): if six.PY2: msg_expect = msg_expect.decode() self.assertMultiLineEqual(message.decode(), msg_expect.decode()) - locale.resetlocale() + locale.setlocale(locale.LC_ALL, "") diff --git a/tests/test_cli/test_buildinfo.py b/tests/test_cli/test_buildinfo.py index d00eb086..1116c055 100644 --- a/tests/test_cli/test_buildinfo.py +++ b/tests/test_cli/test_buildinfo.py @@ -45,7 +45,7 @@ class TestBuildinfo(utils.CliTestCase): 'volume_name': 'DEFAULT'} def tearDown(self): - locale.resetlocale() + locale.setlocale(locale.LC_ALL, "") if self.original_timezone is None: del os.environ['TZ'] else: diff --git a/tests/test_cli/test_hostinfo.py b/tests/test_cli/test_hostinfo.py index 37dabf2e..ea81f168 100644 --- a/tests/test_cli/test_hostinfo.py +++ b/tests/test_cli/test_hostinfo.py @@ -43,7 +43,7 @@ class TestHostinfo(utils.CliTestCase): self.ensure_connection_mock = mock.patch('koji_cli.commands.ensure_connection').start() def tearDown(self): - locale.resetlocale() + locale.setlocale(locale.LC_ALL, "") if self.original_timezone is None: del os.environ['TZ'] else: diff --git a/tests/test_cli/test_list_hosts.py b/tests/test_cli/test_list_hosts.py index f9d19556..f0a21f62 100644 --- a/tests/test_cli/test_list_hosts.py +++ b/tests/test_cli/test_list_hosts.py @@ -40,7 +40,7 @@ class TestListHosts(utils.CliTestCase): 'user_id': 2}] def tearDown(self): - locale.resetlocale() + locale.setlocale(locale.LC_ALL, "") if self.original_timezone is None: del os.environ['TZ'] else: diff --git a/tests/test_cli/test_rpminfo.py b/tests/test_cli/test_rpminfo.py index f9a6a383..c07d7ec4 100644 --- a/tests/test_cli/test_rpminfo.py +++ b/tests/test_cli/test_rpminfo.py @@ -60,7 +60,7 @@ class TestRpminfo(utils.CliTestCase): """ % (self.progname, self.progname) def tearDown(self): - locale.resetlocale() + locale.setlocale(locale.LC_ALL, "") if self.original_timezone is None: del os.environ['TZ'] else: diff --git a/tests/test_hub/test_recycle_build.py b/tests/test_hub/test_recycle_build.py index 795540f1..e57e1f4a 100644 --- a/tests/test_hub/test_recycle_build.py +++ b/tests/test_hub/test_recycle_build.py @@ -91,7 +91,7 @@ class TestRecycleBuild(unittest.TestCase): def test_recycle_states_good(self): for state in 'FAILED', 'CANCELED': - yield self.check_recycle_states_good, koji.BUILD_STATES[state] + self.check_recycle_states_good, koji.BUILD_STATES[state] def check_recycle_states_good(self, state): new = self.new.copy() @@ -121,7 +121,7 @@ class TestRecycleBuild(unittest.TestCase): def test_recycle_states_bad(self): for state in 'BUILDING', 'COMPLETE', 'DELETED': - yield self.check_recycle_states_bad, koji.BUILD_STATES[state] + self.check_recycle_states_bad, koji.BUILD_STATES[state] def check_recycle_states_bad(self, state): new = self.new.copy() @@ -140,7 +140,7 @@ class TestRecycleBuild(unittest.TestCase): [[], True, []], ] for values in vlists: - yield self.check_recycle_query_bad, values + self.check_recycle_query_bad, values def check_recycle_query_bad(self, values): new = self.new.copy() diff --git a/tests/test_lib/test_format_time.py b/tests/test_lib/test_format_time.py index 6946c3ea..3f2b920b 100644 --- a/tests/test_lib/test_format_time.py +++ b/tests/test_lib/test_format_time.py @@ -110,4 +110,4 @@ class TestFormatTime(unittest.TestCase): r = formatTimeLong(d4) self.assertEqual(r, desired) - locale.resetlocale() + locale.setlocale(locale.LC_ALL, "") diff --git a/tests/test_lib/test_utils.py b/tests/test_lib/test_utils.py index cf8d8827..797fa44a 100644 --- a/tests/test_lib/test_utils.py +++ b/tests/test_lib/test_utils.py @@ -781,7 +781,7 @@ class MavenUtilTestCase(unittest.TestCase): result = koji.util.formatChangelog(data) self.assertMultiLineEqual(expect, result) - locale.resetlocale() + locale.setlocale(locale.LC_ALL, "") def test_parseTime(self): """Test parseTime function"""