From 086e98aa98241bfe2d7be2ea08b5f49070f80444 Mon Sep 17 00:00:00 2001 From: Gervais Naoussi Date: Tue, 8 Dec 2015 15:41:11 +0100 Subject: [PATCH] code coverage rogress --- document_page/tests/test_document_page_history.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/document_page/tests/test_document_page_history.py b/document_page/tests/test_document_page_history.py index ee492779..ced210c1 100644 --- a/document_page/tests/test_document_page_history.py +++ b/document_page/tests/test_document_page_history.py @@ -12,6 +12,10 @@ class TestDocumentPageHistory(common.TransactionCase): page.content = 'Test content updated' history_document = self.env['document.page.history'] history_pages = history_document.search([('page_id', '=', page.id)]) - history_document.with_context( - active_ids=[i.id for i in history_pages] - ).get_diff() + active_ids = [i.id for i in history_pages] + + result = history_document.getDiff(active_ids[0], active_ids[0]) + self.assertEqual(result, 'There are no changes in revisions.') + + result = history_document.getDiff(active_ids[0], active_ids[1]) + self.assertNotEqual(result, 'There are no changes in revisions.')