Revision d12e8569 kamaki/clients/test/pithos.py
b/kamaki/clients/test/pithos.py | ||
---|---|---|
52 | 52 |
'x-account-container-count': 7, |
53 | 53 |
'x-account-policy-quota': 53687091200, |
54 | 54 |
'x-account-policy-versioning': 'auto'} |
55 |
container_info = { |
|
56 |
'content-language': 'en-us', |
|
57 |
'content-type': 'text/html; charset=utf-8', |
|
58 |
'date': 'Wed, 06 Mar 2013 15:11:05 GMT', |
|
59 |
'last-modified': 'Wed, 27 Feb 2013 15:56:13 GMT', |
|
60 |
'server': 'gunicorn/0.14.5', |
|
61 |
'vary': 'Accept-Language', |
|
62 |
'x-container-block-hash': 'sha256', |
|
63 |
'x-container-block-size': 4194304, |
|
64 |
'x-container-bytes-used': 309528938, |
|
65 |
'x-container-object-count': 14, |
|
66 |
'x-container-object-meta': '', |
|
67 |
'x-container-policy-quota': 53687091200, |
|
68 |
'x-container-policy-versioning': 'auto'} |
|
55 | 69 |
|
56 | 70 |
|
57 | 71 |
class Pithos(TestCase): |
... | ... | |
139 | 153 |
self.assertEqual(put.mock_calls, expected) |
140 | 154 |
self.FR.status_code = 202 |
141 | 155 |
self.assertRaises(ClientError, self.client.create_container, cont) |
156 |
|
|
157 |
def test_get_container_info(self): |
|
158 |
self.FR.headers = container_info |
|
159 |
with patch.object(PC, 'container_head', return_value=self.FR()) as ch: |
|
160 |
r = self.client.get_container_info() |
|
161 |
self.assert_dicts_are_equal(r, container_info) |
|
162 |
u = 'some date' |
|
163 |
r = self.client.get_container_info(until=u) |
|
164 |
self.assertEqual(ch.mock_calls, [call(until=None), call(until=u)]) |
Also available in: Unified diff