Skip to content

Make translate test handle no translate packages installed.#4786

Merged
frjo merged 1 commit intomainfrom
fix/make-translate-test-work-again
Mar 30, 2026
Merged

Make translate test handle no translate packages installed.#4786
frjo merged 1 commit intomainfrom
fix/make-translate-test-work-again

Conversation

@frjo
Copy link
Copy Markdown
Member

@frjo frjo commented Mar 30, 2026

This fix loads the urls that loads the views before tests are run. This avoid them being loaded after @override_settings() have run.

The problem showed up in test_staff_can_see_translate_primary_action() test that have @override_settings(APPLICATION_TRANSLATIONS_ENABLED=True).

Loading views after @override_settings(APPLICATION_TRANSLATIONS_ENABLED=True) made them look for translation packages that were not installed resulting in failed tests.

@frjo frjo added Type: Maintenance Type: Patch Mini change, used in release drafter labels Mar 30, 2026
@frjo frjo merged commit 3b21164 into main Mar 30, 2026
8 checks passed
wes-otf pushed a commit to OpenTechFund/apply-app that referenced this pull request Apr 6, 2026
…#4786)

This fix loads the urls that loads the views before tests are run. This
avoid them being loaded after @override_settings() have run.

The problem showed up in `test_staff_can_see_translate_primary_action()`
test that have
`@override_settings(APPLICATION_TRANSLATIONS_ENABLED=True)`.

Loading views after
`@override_settings(APPLICATION_TRANSLATIONS_ENABLED=True)` made them
look for translation packages that were not installed resulting in
failed tests.
@frjo frjo deleted the fix/make-translate-test-work-again branch April 10, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Maintenance Type: Patch Mini change, used in release drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant