mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-24 17:38:42 -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_document = self.env['document.page.history']
|
||||||
history_pages = history_document.search([('page_id', '=', page.id)])
|
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]
|
active_ids=[i.id for i in history_pages]
|
||||||
).get_diff())
|
).get_diff()
|
||||||
|
)
|
||||||
|
|
||||||
page.write({'content': 'Text content updated'})
|
page.write({'content': 'Text content updated'})
|
||||||
page.write({'content': 'Text updated'})
|
page.write({'content': 'Text updated'})
|
||||||
@ -27,7 +29,8 @@ class TestDocumentPageShowDiff(common.TransactionCase):
|
|||||||
|
|
||||||
with self.assertRaises(Exception) as context:
|
with self.assertRaises(Exception) as context:
|
||||||
show_diff_object.with_context(
|
show_diff_object.with_context(
|
||||||
active_ids=[i.id for i in history_pages]
|
active_ids=[i.id for i in history_pages]
|
||||||
).get_diff()
|
).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)
|
diff = history.getDiff(ids[0], nids.id)
|
||||||
else:
|
else:
|
||||||
raise exceptions.Warning(
|
raise exceptions.Warning(
|
||||||
_("You need to select minimum one or maximum two history revisions!")
|
_("Select one or maximum two history revisions!")
|
||||||
)
|
)
|
||||||
return diff
|
return diff
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user