mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 07:06:41 +00:00
Use a set, not a list, for share numbers.
This commit is contained in:
parent
587a510b06
commit
2a2ab1ead7
@ -21,7 +21,7 @@ if PY2:
|
||||
else:
|
||||
# typing module not available in Python 2, and we only do type checking in
|
||||
# Python 3 anyway.
|
||||
from typing import Union, Set, List, Optional
|
||||
from typing import Union, Set, Optional
|
||||
from treq.testing import StubTreq
|
||||
|
||||
from base64 import b64encode
|
||||
@ -148,7 +148,7 @@ class StorageClientImmutables(object):
|
||||
upload_secret,
|
||||
lease_renew_secret,
|
||||
lease_cancel_secret,
|
||||
): # type: (bytes, List[int], int, bytes, bytes, bytes) -> Deferred[ImmutableCreateResult]
|
||||
): # type: (bytes, Set[int], int, bytes, bytes, bytes) -> Deferred[ImmutableCreateResult]
|
||||
"""
|
||||
Create a new storage index for an immutable.
|
||||
|
||||
|
@ -303,7 +303,7 @@ class ImmutableHTTPAPITests(SyncTestCase):
|
||||
lease_secret = urandom(32)
|
||||
storage_index = b"".join(bytes([i]) for i in range(16))
|
||||
created = yield im_client.create(
|
||||
storage_index, [1], 100, upload_secret, lease_secret, lease_secret
|
||||
storage_index, {1}, 100, upload_secret, lease_secret, lease_secret
|
||||
)
|
||||
self.assertEqual(
|
||||
created, ImmutableCreateResult(already_have=set(), allocated={1})
|
||||
|
Loading…
Reference in New Issue
Block a user