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):
'''
Tests for automatic translation with different content.
'''
response = self.edit_unit(
self.edit_unit(
'Hello, world!\n',
'Nazdar svete!\n'
)
url = reverse(
'auto_translation',
kwargs={'project': 'test', 'lang': 'cs', 'subproject': 'test-2'}
)
response = self.client.post(
url
)
params = {'project': 'test', 'lang': 'cs', 'subproject': 'test-2'}
url = reverse('auto_translation', kwargs=params)
response = self.client.post(url)
self.assertRedirects(response, reverse('translation', kwargs=params))
# Check we've translated something
translation = self.subproject2.translation_set.get(language_code='cs')
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