mirror of https://github.com/scrapy/scrapy.git
added additional test to ResponseSoup extension
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40747
This commit is contained in:
parent
a413fc3bce
commit
3f13b388c7
|
|
@ -21,6 +21,11 @@ class ResponseSoupTest(unittest.TestCase):
|
|||
# make sure it's cached
|
||||
assert soup1 is soup2
|
||||
|
||||
# when body is None, an empty soup should be returned
|
||||
r1 = Response('http://www.example.com')
|
||||
assert r1.body is None
|
||||
assert isinstance(r1.getsoup(), BeautifulSoup)
|
||||
|
||||
def test_response_soup_caching(self):
|
||||
r1 = Response('http://www.example.com', body='')
|
||||
soup1 = r1.getsoup()
|
||||
|
|
|
|||
Loading…
Reference in New Issue