How to use the pylanguagetool.api.get_languages function in pyLanguagetool

To help you get started, we’ve selected a few pyLanguagetool examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Findus23 / pyLanguagetool / tests / test_api.py View on Github external
def test_languages_request():
    langs = api.get_languages(API_BASE_URL)
    assert isinstance(langs, list)
    assert len(langs) > 2
    found_german = False
    for i, dic in enumerate(langs):
        if dic["code"] == "de":
            found_german = True
    assert found_german