test.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:livescrape 作者: ondergetekende 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号