flake8 error corrected

This commit is contained in:
Gervais Naoussi 2015-12-08 21:20:54 +01:00
parent 72f9a4bc26
commit 6f5c6191b7
2 changed files with 9 additions and 6 deletions

View File

@ -16,9 +16,11 @@ class TestDocumentPageShowDiff(common.TransactionCase):
history_document = self.env['document.page.history']
history_pages = history_document.search([('page_id', '=', page.id)])
self.assertTrue(show_diff_object.with_context(
self.assertTrue(
show_diff_object.with_context(
active_ids=[i.id for i in history_pages]
).get_diff())
).get_diff()
)
page.write({'content': 'Text content updated'})
page.write({'content': 'Text updated'})
@ -27,7 +29,8 @@ class TestDocumentPageShowDiff(common.TransactionCase):
with self.assertRaises(Exception) as context:
show_diff_object.with_context(
active_ids=[i.id for i in history_pages]
).get_diff()
active_ids=[i.id for i in history_pages]
).get_diff()
self.assertTrue(_("You need to select minimum one or maximum two history revisions!") in context.exception)
self.assertTrue(_("Select one or maximum two history revisions!")
in context.exception)

View File

@ -48,7 +48,7 @@ class DocumentPageShowDiff(models.TransientModel):
diff = history.getDiff(ids[0], nids.id)
else:
raise exceptions.Warning(
_("You need to select minimum one or maximum two history revisions!")
_("Select one or maximum two history revisions!")
)
return diff