(self)
| 185 | print "pattern.web.URL.open()" |
| 186 | |
| 187 | def test_url_download(self): |
| 188 | t = time.time() |
| 189 | v = web.URL(self.live).download(cached=False, throttle=0.25, unicode=True) |
| 190 | t = time.time() - t |
| 191 | # Assert unicode content. |
| 192 | self.assertTrue(isinstance(v, unicode)) |
| 193 | # Assert download rate limiting. |
| 194 | self.assertTrue(t >= 0.25) |
| 195 | print "pattern.web.URL.download()" |
| 196 | |
| 197 | def test_url_mimetype(self): |
| 198 | # Assert URL MIME-type. |