Permalink
Browse files

Backport unit test fix for AppIterRange.pop reference

See f26d2e5 (openstack@f26d2e5)

Fixes the error from the unit tests:
  "AttributeError: 'AppIterRange' object has no attribute 'pop'"

Signed-off-by: Peter Portante <peter.portante@redhat.com>
  • Loading branch information...
1 parent fc2421b commit 14dffe66b774eaaf6f35fe0a9ce3152b7886d205 @portante committed Oct 16, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/unit/common/middleware/test_swift3.py
View
4 test/unit/common/middleware/test_swift3.py
@@ -147,8 +147,8 @@ def __call__(self, env, start_response):
if 'HTTP_RANGE' in env:
resp = Response(body=self.object_body,
conditional_response=True)
- iter = resp(env, start_response)
- return iter.pop()
+ resp_iter = iter(resp(env, start_response))
+ return resp_iter.next()
start_response(Response().status)
start_response(self.response_headers)
if env['REQUEST_METHOD'] == 'GET':

0 comments on commit 14dffe6

Please sign in to comment.