123456789101112131415161718192021222324 |
- def setUp(self):
- # Sample highly compressible data.
- self.sample_data = b'abc' * 200
- # Stream of the sample data.
- self.sample_stream = six.BytesIO(self.sample_data)
- # Sample url_builder.
- self.url_builder = base_api._UrlBuilder('http://www.uploads.com')
- # Sample request.
- self.request = http_wrapper.Request(
- 'http://www.uploads.com',
- headers={'content-type': 'text/plain'})
- # Sample successful response.
- self.response = http_wrapper.Response(
- info={'status': http_client.OK,
- 'location': 'http://www.uploads.com'},
- content='',
- request_url='http://www.uploads.com',)
- # Sample failure response.
- self.fail_response = http_wrapper.Response(
- info={'status': http_client.SERVICE_UNAVAILABLE,
- 'location': 'http://www.uploads.com'},
- content='',
- request_url='http://www.uploads.com',)
|