Skip to content

Commit 15c915e

Browse files
fix for be integration
1 parent 5075555 commit 15c915e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

l10n_CM/Unified/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ def get_html_files(live_site, region):
4242

4343
@pytest.fixture()
4444
def region():
45-
return os.environ.get("FX_REGION", "US")
45+
return os.environ.get("FX_REGION", "BE")
4646

4747

4848
@pytest.fixture()
4949
def live_site():
50-
return os.environ.get("CM_SITE", "demo")
50+
return os.environ.get("CM_SITE", "torfs")
5151

5252

5353
@pytest.fixture()

modules/util.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def __init__(self):
109109
"Italy": "Italia",
110110
"Spain": "España",
111111
"Poland": "Polska",
112-
"Belgium": "Belgique"
112+
"Belgium": "België"
113113
}
114114

115115
self.fake = None
@@ -219,14 +219,14 @@ def create_localized_faker(self, country_code: str):
219219
"""
220220

221221
# Check if locale exists, otherwise return None
222-
locale = next(filter(lambda x: country_code in x, AVAILABLE_LOCALES), None)
222+
locale = list(filter(lambda x: country_code in x, AVAILABLE_LOCALES))
223223

224224
if not locale:
225225
logging.error(
226226
f"Invalid country code `{country_code}`. No faker instance created."
227227
)
228228
return None # No fallback
229-
229+
locale = locale[-1]
230230
try:
231231
# seed to get consistent data
232232
if self.fake is None:
@@ -301,7 +301,7 @@ def fake_autofill_data(self, country_code) -> AutofillAddressBase:
301301
getattr(fake, valid_attribute)() if valid_attribute else valid_attribute
302302
)
303303
address_level_2 = fake.city()
304-
postal_code = fake.postcode()
304+
postal_code = fake.postcode()[:4]
305305
country = fake.current_country()
306306
email = fake.email()
307307
telephone = self.generate_localized_phone(country_code, fake)

0 commit comments

Comments
 (0)