Revision 9684f569 kamaki/clients/livetest/pithos.py
b/kamaki/clients/livetest/pithos.py | ||
---|---|---|
246 | 246 |
u1 = self.client.account |
247 | 247 |
# Invalid display name |
248 | 248 |
u2 = '1nc0r3c7-d15p14y-n4m3' |
249 |
# valid display name |
|
250 |
u3 = '6488c1b2-cb06-40a8-a02a-d474b8d29c59' |
|
251 | 249 |
self.assertRaises( |
252 | 250 |
ClientError, |
253 | 251 |
self.client.set_account_group, |
... | ... | |
255 | 253 |
self.client.set_account_group(grpName, [u1]) |
256 | 254 |
r = self.client.get_account_group() |
257 | 255 |
self.assertEqual(r['x-account-group-' + grpName], '%s' % u1) |
258 |
try: |
|
259 |
self.client.set_account_group(grpName, [u1, u3]) |
|
260 |
r = self.client.get_account_group() |
|
261 |
self.assertEqual( |
|
262 |
r['x-account-group-' + grpName], '%s,%s' % (u1, u3)) |
|
263 |
except: |
|
264 |
print('\tInvalid user id %s (it is ok, though)' % u3) |
|
265 | 256 |
self.client.del_account_group(grpName) |
266 | 257 |
r = self.client.get_account_group() |
267 | 258 |
self.assertTrue('x-account-group-' + grpName not in r) |
... | ... | |
692 | 683 |
|
693 | 684 |
def test_object_put(self): |
694 | 685 |
"""Test object_PUT""" |
695 |
self._test_object_put() |
|
686 |
self._test_0150_object_put()
|
|
696 | 687 |
|
697 |
def _test_object_put(self): |
|
688 |
def _test_0150_object_put(self):
|
|
698 | 689 |
self.client.container = self.c2 |
699 | 690 |
obj = 'another.test' |
700 | 691 |
|
... | ... | |
917 | 908 |
content_encoding='utf8', |
918 | 909 |
content_type='application/json', |
919 | 910 |
destination_account='nonExistendAddress@NeverLand.com', |
920 |
success=(201, 403))
|
|
921 |
self.assertEqual(r.status_code, 403)
|
|
911 |
success=(201, 404))
|
|
912 |
self.assertEqual(r.status_code, 404)
|
|
922 | 913 |
|
923 | 914 |
"""Check destination being another container |
924 | 915 |
and also content_type and content encoding""" |
... | ... | |
1019 | 1010 |
content_encoding='utf8', |
1020 | 1011 |
content_type='application/json', |
1021 | 1012 |
destination_account='nonExistendAddress@NeverLand.com', |
1022 |
success=(201, 403))
|
|
1023 |
self.assertEqual(r.status_code, 403)
|
|
1013 |
success=(201, 404))
|
|
1014 |
self.assertEqual(r.status_code, 404)
|
|
1024 | 1015 |
|
1025 | 1016 |
"""Check destination being another container and also |
1026 | 1017 |
content_type, content_disposition and content encoding""" |
Also available in: Unified diff