diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-06-04 12:08:07 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-06-04 12:08:07 +0000 |
| commit | ec3e2ab3a099b1276ae5d87fda936567f64423dc (patch) | |
| tree | bd2d542f8a371ecc9dc050b158f1183683e19e95 /tests/unit/utils.py | |
| parent | f0cc3be2ac2cb6474ba117da323f6369c1e6c791 (diff) | |
| parent | b6457e0f95c2563f745bbfb64c739929bc0dc901 (diff) | |
| download | python-swiftclient-ec3e2ab3a099b1276ae5d87fda936567f64423dc.tar.gz | |
Merge "Allow reading from object body on download"
Diffstat (limited to 'tests/unit/utils.py')
| -rw-r--r-- | tests/unit/utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/unit/utils.py b/tests/unit/utils.py index 63719c7..955296e 100644 --- a/tests/unit/utils.py +++ b/tests/unit/utils.py @@ -155,7 +155,10 @@ def fake_http_connect(*code_iter, **kwargs): sleep(0.1) return ' ' rv = self.body[:amt] - self.body = self.body[amt:] + if amt is not None: + self.body = self.body[amt:] + else: + self.body = '' return rv def send(self, amt=None): |
