Commit d224882a authored by Nicolas Delaby's avatar Nicolas Delaby

Change the way to check some nodes as text:reference-mark nodes are removed

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31035 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f74409c1
# -*- coding: utf-8 -*-
##############################################################################
# -*- coding: utf-8 -*-
# Copyright (c) 2009 Nexedi KK and Contributors. All Rights Reserved.
......@@ -283,11 +284,7 @@ class TestFormPrintout(ERP5TypeTestCase):
builder = OOoBuilder(odf_document)
content_xml = builder.extract("content.xml")
content = etree.XML(content_xml)
number_xpath = '//text:reference-mark[@text:name="number"]'
number_reference = content.xpath(number_xpath, namespaces=content.nsmap)
self.assertTrue(len(number_reference) > 0)
number_paragraph = number_reference[0].getparent()
self.assertEqual(number_paragraph.text, "543 210.0")
self.assertTrue(content.xpath('//text:p = "543 210.0"', namespaces=content.nsmap))
self._validate(odf_document)
# change format
......@@ -297,11 +294,7 @@ class TestFormPrintout(ERP5TypeTestCase):
builder = OOoBuilder(odf_document)
content_xml = builder.extract("content.xml")
content = etree.XML(content_xml)
number_xpath = '//text:reference-mark[@text:name="number"]'
number_reference = content.xpath(number_xpath, namespaces=content.nsmap)
self.assertTrue(len(number_reference) > 0)
number_paragraph = number_reference[0].getparent()
self.assertEqual(number_paragraph.text, "543210.0")
self.assertTrue(content.xpath('//text:p = "543210.0"', namespaces=content.nsmap))
self._validate(odf_document)
......
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