import unittest
from unittest import TestCase
from python_translators.translators.glosbe_translator import GlosbeTranslator
from python_translators.translation_query import TranslationQuery
from translators.glosbe_over_tor_translator import GlosbeOverTorTranslator


class TestGlosbeOverTorTranslator(TestCase):

    def setUp(self):
        self.translator = GlosbeOverTorTranslator(source_language='de', target_language='nl')

    def testNumberOfTranslationsWorks(self):

        response = self.translator.translate(TranslationQuery(
            query="genommen",
            max_translations=5
        ))

        print (response.translations)


        response = self.translator.translate(TranslationQuery(
            query="genommen",
            max_translations=5
        ))

        print (response.translations)

        # response = self.translator.translate(TranslationQuery(
        #     query="genommen",
        #     max_translations=5
        # ))
        #
        # print (response.translations)


        # self.assertEqual(response.translations[0]['translation'], 'bed')
        # self.assertEqual(len(response.translations), 5)



if __name__ == '__main__':
    unittest.main()

bca27e6f0aadf2b848ee651189bc8fd80c66a555
<mask token>


class TestGlosbeOverTorTranslator(TestCase):

    def setUp(self):
        self.translator = GlosbeOverTorTranslator(source_language='de',
            target_language='nl')
    <mask token>


<mask token>

<mask token>


class TestGlosbeOverTorTranslator(TestCase):

    def setUp(self):
        self.translator = GlosbeOverTorTranslator(source_language='de',
            target_language='nl')

    def testNumberOfTranslationsWorks(self):
        response = self.translator.translate(TranslationQuery(query=
            'genommen', max_translations=5))
        print(response.translations)
        response = self.translator.translate(TranslationQuery(query=
            'genommen', max_translations=5))
        print(response.translations)


<mask token>

<mask token>


class TestGlosbeOverTorTranslator(TestCase):

    def setUp(self):
        self.translator = GlosbeOverTorTranslator(source_language='de',
            target_language='nl')

    def testNumberOfTranslationsWorks(self):
        response = self.translator.translate(TranslationQuery(query=
            'genommen', max_translations=5))
        print(response.translations)
        response = self.translator.translate(TranslationQuery(query=
            'genommen', max_translations=5))
        print(response.translations)


if __name__ == '__main__':
    unittest.main()

import unittest
from unittest import TestCase
from python_translators.translators.glosbe_translator import GlosbeTranslator
from python_translators.translation_query import TranslationQuery
from translators.glosbe_over_tor_translator import GlosbeOverTorTranslator


class TestGlosbeOverTorTranslator(TestCase):

    def setUp(self):
        self.translator = GlosbeOverTorTranslator(source_language='de',
            target_language='nl')

    def testNumberOfTranslationsWorks(self):
        response = self.translator.translate(TranslationQuery(query=
            'genommen', max_translations=5))
        print(response.translations)
        response = self.translator.translate(TranslationQuery(query=
            'genommen', max_translations=5))
        print(response.translations)


if __name__ == '__main__':
    unittest.main()

import unittest
from unittest import TestCase
from python_translators.translators.glosbe_translator import GlosbeTranslator
from python_translators.translation_query import TranslationQuery
from translators.glosbe_over_tor_translator import GlosbeOverTorTranslator


class TestGlosbeOverTorTranslator(TestCase):

    def setUp(self):
        self.translator = GlosbeOverTorTranslator(source_language='de', target_language='nl')

    def testNumberOfTranslationsWorks(self):

        response = self.translator.translate(TranslationQuery(
            query="genommen",
            max_translations=5
        ))

        print (response.translations)


        response = self.translator.translate(TranslationQuery(
            query="genommen",
            max_translations=5
        ))

        print (response.translations)

        # response = self.translator.translate(TranslationQuery(
        #     query="genommen",
        #     max_translations=5
        # ))
        #
        # print (response.translations)


        # self.assertEqual(response.translations[0]['translation'], 'bed')
        # self.assertEqual(len(response.translations), 5)



if __name__ == '__main__':
    unittest.main()
