Revision 78348987 contrib/snf-pithos-tools/pithos/tools/test.py
b/contrib/snf-pithos-tools/pithos/tools/test.py | ||
---|---|---|
2182 | 2182 |
self.upload_random_data(self.container, self.object+'a/') |
2183 | 2183 |
self.dir_content_types = ('application/directory', 'application/folder') |
2184 | 2184 |
|
2185 |
def assert_read(self, authorized=[], any=False, depth=0): |
|
2185 |
def assert_read(self, authorized=None, any=False, depth=0): |
|
2186 |
authorized = authorized or [] |
|
2186 | 2187 |
for token, account in OTHER_ACCOUNTS.items(): |
2187 | 2188 |
cl = Pithos_Client(get_url(), token, account) |
2188 | 2189 |
if account in authorized or any: |
... | ... | |
2213 | 2214 |
self.assert_raises_fault(403, cl.retrieve_object_metadata, |
2214 | 2215 |
self.container, o, account=get_user()) |
2215 | 2216 |
|
2216 |
def assert_write(self, authorized=[], any=False): |
|
2217 |
def assert_write(self, authorized=None, any=False): |
|
2218 |
authorized = authorized or [] |
|
2217 | 2219 |
o_data = self.client.retrieve_object(self.container, self.object) |
2218 | 2220 |
for token, account in OTHER_ACCOUNTS.items(): |
2219 | 2221 |
cl = Pithos_Client(get_url(), token, account) |
Also available in: Unified diff