mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-27 14:57:25 -05:00
Add locale fixtures
This commit is contained in:
parent
7ab77710a1
commit
27b917e9e5
@ -83,6 +83,26 @@ def default_zw():
|
|||||||
shutil.rmtree(tmp_dir)
|
shutil.rmtree(tmp_dir)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def locale_en(monkeypatch):
|
||||||
|
monkeypatch.setattr('locale.getdefaultlocale', lambda: ('en_US', 'UTF-8'))
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def locale_fr(monkeypatch):
|
||||||
|
monkeypatch.setattr('locale.getdefaultlocale', lambda: ('fr_FR', 'UTF-8'))
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def locale_invalid(monkeypatch):
|
||||||
|
monkeypatch.setattr('locale.getdefaultlocale', lambda: ('xx_XX', 'UTF-8'))
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def locale_ru(monkeypatch):
|
||||||
|
monkeypatch.setattr('locale.getdefaultlocale', lambda: ('ru_RU', 'UTF-8'))
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def platform_darwin(monkeypatch):
|
def platform_darwin(monkeypatch):
|
||||||
monkeypatch.setattr('platform.system', lambda: 'Darwin')
|
monkeypatch.setattr('platform.system', lambda: 'Darwin')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user