Skip to content
Snippets Groups Projects
Commit ce29843c authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

docstring and light reformatting

parent 9fed776d
No related branches found
No related tags found
1 merge request!248Turn off implicit lease renewal for allocate_buckets
......@@ -450,8 +450,18 @@ class ShareTests(TestCase):
)
def get_lease_grant_times(storage_server, storage_index):
for sharenum, sharepath in storage_server._get_bucket_shares(storage_index):
yield sharenum, list(lease.get_grant_renew_time_time() for lease in get_share_file(sharepath).get_leases())
"""
Get the grant times for all of the leases for all of the shares at the
given storage index.
"""
shares = storage_server._get_bucket_shares(storage_index)
for sharenum, sharepath in shares:
sharefile = get_share_file(sharepath)
leases = sharefile.get_leases()
grant_times = list(
lease.get_grant_renew_time_time() for lease in leases
)
yield sharenum, grant_times
expected_leases = {}
# Chop off the non-integer part of the expected values because share
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment