daily pastebin goal
19%
SHARE
TWEET

Untitled

a guest May 16th, 2018 117 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ____________________________________________________ TestIntegration.test_modify_chunk _____________________________________________________
  2.  
  3. self = <test_.TestIntegration object at 0x1043a45d0>
  4.  
  5.     def test_modify_chunk(self):
  6.             start_r = 50
  7.             end_r = 100
  8.             qs = '/users/%s/files/rp_mod_chunk' % _.uid
  9.             body = 'A' * (CHUNK_SIZE - 10)
  10.             assert self.query(verb="POST", resource=qs, body=body).status == 201
  11.             change = 'B' * 50
  12.             headers = {"Content-Range": "bytes %d-%d/%d" % (start_r-1, end_r-1, len(body))} # byte 50-100
  13.             self.query(verb="PUT", resource=qs, body=change, header=headers)
  14.             new_file = body[0:start_r] + change + body[end_r:]
  15.             assert len(new_file) == len(body) # make sure its what we are looking for
  16. >           mod_file = self.query(verb="GET", resource=qs).body
  17. E           AttributeError: HTTPResponse instance has no attribute 'body'
  18.  
  19. body       = 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
  20. change     = 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'
  21. end_r      = 100
  22. headers    = {'Content-Range': 'bytes 49-99/262134'}
  23. new_file   = 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBAAAAAAAAAAAAAAAAA...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
  24. qs         = '/users/4f06487510e9977964000000/files/rp_mod_chunk'
  25. self       = <test_.TestIntegration object at 0x1043a45d0>
  26. start_r    = 50
  27.  
  28. test_.py:267: AttributeError
  29. ------------------------------------------------------------- Captured stderr --------------------------------------------------------------
  30. 1.0.0.127.in-addr.arpa - - [05/Jan/2012 17:03:50] "POST /users/4f06487510e9977964000000/files/rp_mod_chunk HTTP/1.1" 201 36
  31. 1.0.0.127.in-addr.arpa - - [05/Jan/2012 17:03:50] "PUT /users/4f06487510e9977964000000/files/rp_mod_chunk HTTP/1.1" 404 19
  32. Traceback (most recent call last):
  33.   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 86, in run
  34.     self.finish_response()
  35.   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 127, in finish_response
  36.     self.write(data)
  37.   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 215, in write
  38.     self._write(data)
  39.   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 324, in write
  40.     self.flush()
  41.   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 303, in flush
  42.     self._sock.sendall(view[write_offset:write_offset+buffer_size])
  43. error: [Errno 32] Broken pipe
  44. Traceback (most recent call last):
  45.   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock
  46.     self.process_request(request, client_address)
  47.   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 310, in process_request
  48.     self.finish_request(request, client_address)
  49.   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 323, in finish_request
  50.     self.RequestHandlerClass(request, client_address, self)
  51.   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 641, in __init__
  52.     self.finish()
  53.   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 694, in finish
  54.     self.wfile.flush()
  55.   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 303, in flush
  56.     self._sock.sendall(view[write_offset:write_offset+buffer_size])
  57. error: [Errno 32] Broken pipe
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top