Commit fd3443cd authored by Michal Čihař's avatar Michal Čihař

Test resulting redirect

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 255484f2
...@@ -984,17 +984,14 @@ class AutoTranslationTest(ViewTestCase): ...@@ -984,17 +984,14 @@ class AutoTranslationTest(ViewTestCase):
''' '''
Tests for automatic translation with different content. Tests for automatic translation with different content.
''' '''
response = self.edit_unit( self.edit_unit(
'Hello, world!\n', 'Hello, world!\n',
'Nazdar svete!\n' 'Nazdar svete!\n'
) )
url = reverse( params = {'project': 'test', 'lang': 'cs', 'subproject': 'test-2'}
'auto_translation', url = reverse('auto_translation', kwargs=params)
kwargs={'project': 'test', 'lang': 'cs', 'subproject': 'test-2'} response = self.client.post(url)
) self.assertRedirects(response, reverse('translation', kwargs=params))
response = self.client.post(
url
)
# Check we've translated something # Check we've translated something
translation = self.subproject2.translation_set.get(language_code='cs') translation = self.subproject2.translation_set.get(language_code='cs')
self.assertEqual(translation.translated, 1) self.assertEqual(translation.translated, 1)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment