mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-23 04:22:04 -06:00
flake8 error corrected
This commit is contained in:
parent
72f9a4bc26
commit
6f5c6191b7
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user