Skip to content

Commit

Permalink
tests: add Apertium test to use supported languages only when validat…
Browse files Browse the repository at this point in the history
…ing settings
  • Loading branch information
SukiCZ committed Oct 4, 2024
1 parent ffed817 commit f9ad1db
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions weblate/machinery/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,16 @@ def mock_response(self) -> None:
},
)

@responses.activate
def test_validate_settings(self):
self.mock_response()
machine = self.get_machine()
machine.validate_settings()
self.assertEqual(len(responses.calls), 2)
_, call_2 = responses.calls
self.assertIn("langpair", call_2.request.params)
self.assertEqual("eng|spa", call_2.request.params["langpair"])

@responses.activate
def test_translations_cache(self) -> None:
self.mock_response()
Expand Down

0 comments on commit f9ad1db

Please sign in to comment.