Skip to content

Fix broken tests following locales tweaks#23168

Merged
diox merged 4 commits intomozilla:masterfrom
diox:fix-test-search-ranking-failure
Mar 13, 2025
Merged

Fix broken tests following locales tweaks#23168
diox merged 4 commits intomozilla:masterfrom
diox:fix-test-search-ranking-failure

Conversation

@diox
Copy link
Copy Markdown
Member

@diox diox commented Mar 13, 2025

Follow-up for mozilla/addons#15433

Copy link
Copy Markdown
Member

@eviljeff eviljeff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have the linting fix in this PR too? (run ruff format)

@diox diox force-pushed the fix-test-search-ranking-failure branch from e02c239 to e38228b Compare March 13, 2025 13:40
@diox diox changed the title Fix test_score_boost_exact_match_in_right_language test following locales tweaks Fix broken tests following locales tweaks Mar 13, 2025
@diox
Copy link
Copy Markdown
Member Author

diox commented Mar 13, 2025

With the way the code was previously written it would warn for locales already removed, which is why the tests were broken. My changes in src/olympia/amo/management/commands/check_locales_completion_rate.py fix that, and I've adjusted the tests + contents of the fixture file to make it more apparent.

@diox diox requested a review from eviljeff March 13, 2025 14:50

@pytest.mark.parametrize('lang', settings.LANGUAGES_BIDI)
def test_bidi_language_in_amo_languages(lang):
"""Make sure all bidi marked locales are in AMO_LANGUAGES too."""
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm removing this test because that's no longer true, some bidi locales are no longer enabled on the site

@diox diox merged commit 6ef1a49 into mozilla:master Mar 13, 2025
39 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants