Home
last modified time | relevance | path

Searched refs:fakehttp (Results 1 – 4 of 4) sorted by relevance

/external/python/cpython2/Lib/test/
Dtest_urllib.py25 def fakehttp(fakedata): function
58 def fakehttp(self, fakedata): member in FakeHTTPMixin
61 httplib.HTTP._connection_class = fakehttp(fakedata)
240 self.fakehttp('Hello!')
253 self.fakehttp('Hello!')
262 self.fakehttp('''HTTP/1.1 401 Authentication Required
275 self.fakehttp("""HTTP/1.1 302 Found
293 self.fakehttp(b'''HTTP/1.1 302 Found
306 self.fakehttp('')
334 self.fakehttp('Hello!')
[all …]
Dtest_urllib2.py1045 httplib.HTTPConnection = test_urllib.fakehttp(response1)
/external/python/cpython3/Lib/test/
Dtest_urllib.py59 def fakehttp(fakedata): function
99 def fakehttp(self, fakedata): member in FakeHTTPMixin
101 http.client.HTTPConnection = fakehttp(fakedata)
304 self.fakehttp(b"HTTP/" + ver + b" 200 OK\r\n\r\nHello!")
317 self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello!")
325 self.fakehttp(b"HTTP/1.1 200 OK\r\n\r\nHello!")
345 self.fakehttp(b'''HTTP/1.1 401 Authentication Required
358 self.fakehttp(b'''HTTP/1.1 302 Found
376 self.fakehttp(b'''HTTP/1.1 302 Found
389 self.fakehttp(b'')
[all …]
Dtest_urllib2.py1297 http.client.HTTPConnection = test_urllib.fakehttp(response1)
1317 self.connection = test_urllib.fakehttp(
1334 handler.connection = test_urllib.fakehttp(
1681 conn = test_urllib.fakehttp(header.encode() + data)
1692 conn = test_urllib.fakehttp(b"")