def test_two_attributes(self): query = _make_xpath_query("descendant::text:h", text_style="Standard", outline_level=1) expected = ('descendant::text:h[@text:outline-level="1"]' '[@text:style-name="Standard"]') self.assertEqual(query, expected)
def test_attribute_position(self): query = _make_xpath_query("descendant::text:p", text_style="Standard", position=1) self.assertEqual( query, '(descendant::text:p[@text:style-name="Standard"])[2]')
def test_position(self): query = _make_xpath_query("descendant::text:h", position=1) self.assertEqual(query, "(descendant::text:h)[2]")
def test_attribute(self): query = _make_xpath_query("descendant::text:p", text_style="Standard") self.assertEqual(query, 'descendant::text:p[@text:style-name="Standard"]')
def test_element(self): query = _make_xpath_query("descendant::text:p") self.assertEqual(query, "descendant::text:p")
def test_position(self): query = _make_xpath_query('descendant::text:h', position=1) self.assertEqual(query, '(descendant::text:h)[2]')