mirror of
https://github.com/onionshare/onionshare.git
synced 2025-11-30 02:56:50 -05:00
Use locale.getlocale() instead of deprecated locale.getdefaultlocale()
This commit is contained in:
parent
2e222ce09d
commit
62073ab708
2 changed files with 6 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import sys
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
import pytest
|
||||
|
|
@ -116,22 +116,22 @@ def default_zw():
|
|||
|
||||
@pytest.fixture
|
||||
def locale_en(monkeypatch):
|
||||
monkeypatch.setattr("locale.getdefaultlocale", lambda: ("en_US", "UTF-8"))
|
||||
monkeypatch.setattr("locale.getlocale", lambda: ("en_US", "UTF-8"))
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def locale_fr(monkeypatch):
|
||||
monkeypatch.setattr("locale.getdefaultlocale", lambda: ("fr_FR", "UTF-8"))
|
||||
monkeypatch.setattr("locale.getlocale", lambda: ("fr_FR", "UTF-8"))
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def locale_invalid(monkeypatch):
|
||||
monkeypatch.setattr("locale.getdefaultlocale", lambda: ("xx_XX", "UTF-8"))
|
||||
monkeypatch.setattr("locale.getlocale", lambda: ("xx_XX", "UTF-8"))
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def locale_ru(monkeypatch):
|
||||
monkeypatch.setattr("locale.getdefaultlocale", lambda: ("ru_RU", "UTF-8"))
|
||||
monkeypatch.setattr("locale.getlocale", lambda: ("ru_RU", "UTF-8"))
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue