Skip to content

Commit

Permalink
fix(firefox_web_driver): configure Firefox's locale at fixture time
Browse files Browse the repository at this point in the history
Otherwise the fixture isn't set up to request the language expected by
the tests that use it.
  • Loading branch information
cfm committed Oct 11, 2024
1 parent 62d1934 commit f570aaa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions securedrop/tests/functional/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@

# Function-scoped so that tests can be run in parallel if needed
@pytest.fixture
def firefox_web_driver() -> WebDriver: # type: ignore
with get_web_driver(web_driver_type=WebDriverTypeEnum.FIREFOX) as web_driver:
def firefox_web_driver(locale: str) -> WebDriver: # type: ignore
with get_web_driver(
web_driver_type=WebDriverTypeEnum.FIREFOX,
accept_languages=locale.replace("_", "-"),
) as web_driver:
yield web_driver


Expand Down

0 comments on commit f570aaa

Please sign in to comment.