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

Test accept_edit behaviour

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent e3f9622b
......@@ -110,6 +110,22 @@ class SuggestionsTest(ViewTestCase):
self.assertFalse(unit.fuzzy)
self.assertEqual(len(self.get_unit().suggestions()), 1)
def test_accept_edit(self):
translate_url = self.get_translation().get_translate_url()
# Create suggestion
self.add_suggestion_1()
# Get ids of created suggestions
suggestion = self.get_unit().suggestions()[0].pk
# Accept one of suggestions
response = self.edit_unit(
'Hello, world!\n',
'',
accept_edit=suggestion,
)
self.assertRedirectsOffset(response, translate_url, 0)
def test_accept(self):
translate_url = self.get_translation().get_translate_url()
# Create two suggestions
......
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