added additional test to ResponseSoup extension

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40747
This commit is contained in:
Pablo Hoffman 2009-01-18 19:31:35 +00:00
parent a413fc3bce
commit 3f13b388c7
1 changed files with 5 additions and 0 deletions

View File

@ -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()