Commit c2e87e19 authored by Jérome Perrin's avatar Jérome Perrin

simplify


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38457 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 72a737aa
...@@ -592,9 +592,7 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -592,9 +592,7 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
self.assertTrue('<img' in html, html) self.assertTrue('<img' in html, html)
# find the img src # find the img src
parser = etree.HTMLParser() img_list = etree.HTML(html).findall('.//img')
tree = etree.parse(StringIO(html), parser)
img_list = tree.findall('//img')
self.assertEquals(1, len(img_list)) self.assertEquals(1, len(img_list))
src = img_list[0].get('src') src = img_list[0].get('src')
...@@ -619,9 +617,7 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -619,9 +617,7 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
self.assertTrue('<img' in html, html) self.assertTrue('<img' in html, html)
# find the img src # find the img src
parser = etree.HTMLParser() img_list = etree.HTML(html).findall('.//img')
tree = etree.parse(StringIO(html), parser)
img_list = tree.findall('//img')
self.assertEquals(1, len(img_list)) self.assertEquals(1, len(img_list))
src = img_list[0].get('src') src = img_list[0].get('src')
......
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