MCPcopy Index your code
hub / github.com/clips/pattern / test_url_download

Method test_url_download

test/test_web.py:187–195  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 1

downloadMethod · 0.45

Tested by

no test coverage detected