How to use the duden.main.URL_FORM.format function in duden

To help you get started, we’ve selected a few duden 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 radomirbosak / duden / tests / test_duden.py View on Github external
def test_load_soup(self):
        """
        Test if the load_soup function works correctly
        """
        word = 'laufen'
        url = duden.URL_FORM.format(word=word)
        r = requests.get(url)
        soup = bs4.BeautifulSoup(r.text, 'html.parser')
        dword = duden.load_soup(soup)
        self.assertEqual(word, dword.title)