Пример #1
0
    class TestFrengly:

        def setup_class(self):
            self.backend = FrenglyBackend()

        def test_init(self):
            email, passw = os.environ.get('FRENGLY_EMAIL'), \
                           os.environ.get('FRENGLY_PASSWORD')

            assert self.backend.activate({'email': email, 'password': passw,
                                          'active': True})

        def test_translate(self):
            # get pairs that are english -> ?
            pairs = filter(lambda p: p[0] == 'en', self.backend.language_pairs)

            trans = self.backend.translate('hello', pairs[0][0], pairs[0][1])
            assert trans
Пример #2
0
    class TestFrengly:
        def setup_class(self):
            self.backend = FrenglyBackend()

        def test_init(self):
            email, passw = os.environ.get('FRENGLY_EMAIL'), \
                           os.environ.get('FRENGLY_PASSWORD')

            assert self.backend.activate({
                'email': email,
                'password': passw,
                'active': True
            })

        def test_translate(self):
            # get pairs that are english -> ?
            pairs = filter(lambda p: p[0] == 'en', self.backend.language_pairs)

            trans = self.backend.translate('hello', pairs[0][0], pairs[0][1])
            assert trans
Пример #3
0
 def setup_class(self):
     self.backend = FrenglyBackend()
Пример #4
0
 def setup_class(self):
     self.backend = FrenglyBackend()