From 53af75be65475f565820e2d58d7c04979c04ba7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Wed, 15 Nov 2023 09:16:21 +0100 Subject: [PATCH] Fix leftover `locale.getdefaultlocale` mock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the remaining `locale.getdefaultlocale` mock with `locale.getlocale`. 77a994a99385d33b1b2e626094cbd09fd0d85873 has replaced the `locale.getdefaultlocale()` call and updated all other mocks but this one remained, causing test failures on non-en_US locales. Closes-Bug: 2043539 Change-Id: I5ab36a0ead05fa7a83fc1c64e440482f2cc8e675 Signed-off-by: Michał Górny --- oslo_i18n/fixture.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oslo_i18n/fixture.py b/oslo_i18n/fixture.py index 5c5fddc..7a69aff 100644 --- a/oslo_i18n/fixture.py +++ b/oslo_i18n/fixture.py @@ -160,5 +160,5 @@ class PrefixLazyTranslation(fixtures.Fixture): lambda *x, **y: self.languages)) self.useFixture(fixtures.MonkeyPatch('gettext.translation', _prefix_translations)) - self.useFixture(fixtures.MonkeyPatch('locale.getdefaultlocale', + self.useFixture(fixtures.MonkeyPatch('locale.getlocale', lambda *x, **y: self.locale))