summaryrefslogtreecommitdiff
path: root/dev-python/oslo-i18n/files/oslo-i18n-6.2.0-test.patch
blob: 6c3c19be0644c77a15648b35bccc7a453225dddd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 151fa09cf0248b2dfc8bb9e960e0383583985781 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
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 <mgorny@gentoo.org>
---
 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))
-- 
2.42.1