diff options
author | Thomas Parslow <tom@almostobsolete.net> | 2012-09-06 09:54:50 +0100 |
---|---|---|
committer | Thomas Parslow <tom@almostobsolete.net> | 2012-09-06 09:54:50 +0100 |
commit | 3ceeede15de8b769c2d20e9dc884df12b72f029f (patch) | |
tree | de608cdfa2dbd80b9e4da34e5591ffef686b1461 | |
parent | 720a947a3c6e5c0bddaeb6de3906740296bc2870 (diff) | |
download | boto-3ceeede15de8b769c2d20e9dc884df12b72f029f.tar.gz |
Fixed the tests to work with GlacierResponse
-rw-r--r-- | tests/unit/__init__.py | 4 | ||||
-rw-r--r-- | tests/unit/glacier/test_layer1.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index 8c9a5ec3..4e52b766 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -45,10 +45,12 @@ class AWSMockServiceTestCase(unittest.TestCase): response.reason = reason response.getheaders.return_value = header - def overwrite_header(arg): + def overwrite_header(arg, default=None): header_dict = dict(header) if header_dict.has_key(arg): return header_dict[arg] + else: + return default response.getheader.side_effect = overwrite_header return response diff --git a/tests/unit/glacier/test_layer1.py b/tests/unit/glacier/test_layer1.py index afad4238..7d7b6fc2 100644 --- a/tests/unit/glacier/test_layer1.py +++ b/tests/unit/glacier/test_layer1.py @@ -75,4 +75,4 @@ class GlacierJobOperations(GlacierLayer1ConnectionBase): body=self.job_content) response = self.service_connection.get_job_output(self.vault_name, 'example-job-id') - self.assertEqual(self.job_content, response['Response']) + self.assertEqual(self.job_content, response.read()) |