Revision 4443152f kamaki/clients/pithos/test.py
b/kamaki/clients/pithos/test.py | ||
---|---|---|
1422 | 1422 |
GAI.assert_called_once_with() |
1423 | 1423 |
self.assertEqual(r[key], account_info[key]) |
1424 | 1424 |
|
1425 |
@patch('%s.get_account_info' % pithos_pkg, return_value=account_info) |
|
1426 |
def test_get_account_versioning(self, GAI): |
|
1427 |
key = 'x-account-policy-versioning' |
|
1428 |
r = self.client.get_account_versioning() |
|
1429 |
GAI.assert_called_once_with() |
|
1430 |
self.assertEqual(r[key], account_info[key]) |
|
1425 |
#@patch('%s.get_account_info' % pithos_pkg, return_value=account_info)
|
|
1426 |
#def test_get_account_versioning(self, GAI):
|
|
1427 |
# key = 'x-account-policy-versioning'
|
|
1428 |
# r = self.client.get_account_versioning()
|
|
1429 |
# GAI.assert_called_once_with()
|
|
1430 |
# self.assertEqual(r[key], account_info[key])
|
|
1431 | 1431 |
|
1432 | 1432 |
def test_get_account_meta(self): |
1433 | 1433 |
key = 'x-account-meta-' |
... | ... | |
1473 | 1473 |
self.client.set_account_meta(metas) |
1474 | 1474 |
post.assert_called_once_with(update=True, metadata=metas) |
1475 | 1475 |
|
1476 |
""" |
|
1477 |
@patch('%s.account_post' % pithos_pkg, return_value=FR()) |
|
1478 |
def test_set_account_quota(self, post): |
|
1479 |
qu = 1024 |
|
1480 |
self.client.set_account_quota(qu) |
|
1481 |
post.assert_called_once_with(update=True, quota=qu) |
|
1482 |
""" |
|
1476 |
#@patch('%s.account_post' % pithos_pkg, return_value=FR()) |
|
1477 |
#def test_set_account_quota(self, post): |
|
1478 |
# qu = 1024 |
|
1479 |
# self.client.set_account_quota(qu) |
|
1480 |
# post.assert_called_once_with(update=True, quota=qu) |
|
1483 | 1481 |
|
1484 |
@patch('%s.account_post' % pithos_pkg, return_value=FR()) |
|
1485 |
def test_set_account_versioning(self, post): |
|
1486 |
vrs = 'n3wV3r51on1ngTyp3' |
|
1487 |
self.client.set_account_versioning(vrs) |
|
1488 |
post.assert_called_once_with(update=True, versioning=vrs) |
|
1482 |
#@patch('%s.account_post' % pithos_pkg, return_value=FR())
|
|
1483 |
#def test_set_account_versioning(self, post):
|
|
1484 |
# vrs = 'n3wV3r51on1ngTyp3'
|
|
1485 |
# self.client.set_account_versioning(vrs)
|
|
1486 |
# post.assert_called_once_with(update=True, versioning=vrs)
|
|
1489 | 1487 |
|
1490 | 1488 |
@patch('%s.container_delete' % pithos_pkg, return_value=FR()) |
1491 | 1489 |
def test_del_container(self, delete): |
... | ... | |
1601 | 1599 |
def test_publish_object(self, post): |
1602 | 1600 |
oinfo = dict(object_info) |
1603 | 1601 |
val = 'pubL1c' |
1604 |
oinfo['x-object-public'] = val |
|
1602 |
oinfo['x-object-public'] = 'https://www.example.com/' + val
|
|
1605 | 1603 |
with patch.object( |
1606 | 1604 |
pithos.PithosClient, 'get_object_info', |
1607 | 1605 |
return_value=oinfo) as GOF: |
Also available in: Unified diff