diff options
| author | Stuart McLaren <stuart.mclaren@hp.com> | 2015-08-31 10:29:03 +0000 |
|---|---|---|
| committer | Stuart McLaren <stuart.mclaren@hp.com> | 2016-06-29 16:08:30 +0000 |
| commit | 7ed22a91d3a587c8e0af2072a421812d176753f4 (patch) | |
| tree | c64acec3db43c0821908a76402a4dd3dfccd4bf2 /glanceclient/tests/utils.py | |
| parent | 8a584d59384fc5c809cd7923f2d40fe9bcfc5011 (diff) | |
| download | python-glanceclient-7ed22a91d3a587c8e0af2072a421812d176753f4.tar.gz | |
image-download: tests to catch stray output
Add unit tests to ensure that any stray output (eg print
statements) during image-download cause a test failure.
Regression test for bug 1488914.
Change-Id: Ic19ba5693d059bf7c283702e7c333672a878a1a1
Partial-bug: 1488914
Diffstat (limited to 'glanceclient/tests/utils.py')
| -rw-r--r-- | glanceclient/tests/utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/glanceclient/tests/utils.py b/glanceclient/tests/utils.py index 377d3f4..6b03f31 100644 --- a/glanceclient/tests/utils.py +++ b/glanceclient/tests/utils.py @@ -118,6 +118,10 @@ class FakeResponse(object): version=version, status=status_code) @property + def status(self): + return self.status_code + + @property def ok(self): return (self.status_code < 400 or self.status_code >= 600) @@ -151,6 +155,9 @@ class FakeResponse(object): break yield chunk + def release_conn(self, **kwargs): + pass + class TestCase(testtools.TestCase): TEST_REQUEST_BASE = { |
