From 4418fc3b862fd0b23062be70ae6e07fcf34ea4b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=9D=CE=B9=CE=BA=CF=8C=CE=BB=CE=B1=CE=BF=CF=82-=CE=94?= =?UTF-8?q?=CE=B9=CE=B3=CE=B5=CE=BD=CE=AE=CF=82=20=CE=9A=CE=B1=CF=81=CE=B1?= =?UTF-8?q?=CE=B3=CE=B9=CE=AC=CE=BD=CE=BD=CE=B7=CF=82?= Date: Wed, 7 Oct 2015 14:43:47 +0300 Subject: [PATCH] test xml nodename with dots --- tests/test_utils_iterators.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/test_utils_iterators.py b/tests/test_utils_iterators.py index a7042a6cf..47bc6aa0b 100644 --- a/tests/test_utils_iterators.py +++ b/tests/test_utils_iterators.py @@ -33,6 +33,19 @@ class XmliterTestCase(unittest.TestCase): self.assertEqual(attrs, [(['001'], ['Name 1'], ['Type 1']), (['002'], ['Name 2'], ['Type 2'])]) + def test_xmliter_unusual_node(self): + body = b""" + + + + + """ + response = XmlResponse(url="http://example.com", body=body) + nodenames = [e.xpath('name()').extract() + for e in self.xmliter(response, 'matchme...')] + self.assertEqual(nodenames, [['matchme...']]) + + def test_xmliter_text(self): body = u"""onetwo"""