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
This commit is contained in:
@@ -117,6 +117,10 @@ class FakeResponse(object):
|
||||
self.raw = RawRequest(headers, body=body, reason=reason,
|
||||
version=version, status=status_code)
|
||||
|
||||
@property
|
||||
def status(self):
|
||||
return self.status_code
|
||||
|
||||
@property
|
||||
def ok(self):
|
||||
return (self.status_code < 400 or
|
||||
@@ -151,6 +155,9 @@ class FakeResponse(object):
|
||||
break
|
||||
yield chunk
|
||||
|
||||
def release_conn(self, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
class TestCase(testtools.TestCase):
|
||||
TEST_REQUEST_BASE = {
|
||||
|
||||
Reference in New Issue
Block a user