def setUp(self):
responses.reset()
responses.add(
responses.GET, BasePage.scrape_url,
"""<html><body>
<h1 class="foo" data-foo=1>Heading</h1>
<h1 id="the-id">15</h1>
<span class=float>3.14</span>
<span class=int>42</span>
<span class=bool></span>
<span class=date>2016-04-23</span>
<a href="/very-fake">link</a>
<table>
<tr>test123
<th>key</th> testmore
<td>value</th></tr>
<tr><th>key2<td>value2</tr>
</table
""")
responses.start()
self.addCleanup(responses.stop)
评论列表
文章目录