| Index: third_party/gsutil/gslib/test_util.py
|
| diff --git a/third_party/gsutil/20110627/gslib/test_util.py b/third_party/gsutil/gslib/test_util.py
|
| similarity index 72%
|
| rename from third_party/gsutil/20110627/gslib/test_util.py
|
| rename to third_party/gsutil/gslib/test_util.py
|
| index e77dd1fdcf7eb76f3d0b14c2fc4e89fe912072dc..7f1703baa72c43da6f5314e0679ada74fb12dd1e 100644
|
| --- a/third_party/gsutil/20110627/gslib/test_util.py
|
| +++ b/third_party/gsutil/gslib/test_util.py
|
| @@ -24,6 +24,7 @@
|
| """Utility class for gslib unit tests"""
|
|
|
| import sys
|
| +import wildcard_iterator
|
| # Put local libs at front of path so tests will run latest lib code rather
|
| # than whatever code is found on user's PYTHONPATH.
|
| sys.path.insert(0, '.')
|
| @@ -31,29 +32,27 @@ sys.path.insert(0, 'boto')
|
| import boto
|
| from gslib.project_id import ProjectIdHandler
|
| from tests.s3 import mock_storage_service
|
| -import wildcard_iterator
|
|
|
| proj_id_handler = ProjectIdHandler()
|
|
|
|
|
| -def test_wildcard_iterator(uri_or_str,
|
| - result_type=wildcard_iterator.ResultType.URIS,
|
| - debug=0):
|
| +def test_wildcard_iterator(uri_or_str, debug=0):
|
| """
|
| - Convenience method for instantiating a testing
|
| - instance of WildCardIterator, without having to specify
|
| - all the params of that class (like
|
| - bucket_storage_uri_class=mock_storage_service.MockBucketStorageUri).
|
| - Also naming the factory method this way makes it clearer in the test
|
| - code that WildcardIterator needs to be set up for testing.
|
| + Convenience method for instantiating a testing instance of
|
| + WildCardIterator, without having to specify all the params of that class
|
| + (like bucket_storage_uri_class=mock_storage_service.MockBucketStorageUri).
|
| + Also naming the factory method this way makes it clearer in the test code
|
| + that WildcardIterator needs to be set up for testing.
|
| +
|
| + Args are same as for wildcard_iterator.wildcard_iterator(), except there's
|
| + no bucket_storage_uri_class arg.
|
|
|
| - Args, Returns, and Raises are same as for
|
| - wildcard_iterator.wildcard_iterator(), except there's no
|
| - bucket_storage_uri_class arg.
|
| + Returns:
|
| + WildcardIterator.IterUris(), over which caller can iterate.
|
| """
|
| return wildcard_iterator.wildcard_iterator(
|
| - uri_or_str, proj_id_handler, result_type,
|
| - mock_storage_service.MockBucketStorageUri, headers={}, debug=debug)
|
| + uri_or_str, proj_id_handler,
|
| + mock_storage_service.MockBucketStorageUri, debug=debug)
|
|
|
|
|
| def test_storage_uri(uri_str, default_scheme='file', debug=0, validate=True):
|
| @@ -64,9 +63,8 @@ def test_storage_uri(uri_str, default_scheme='file', debug=0, validate=True):
|
| Also naming the factory method this way makes it clearer in the test
|
| code that StorageUri needs to be set up for testing.
|
|
|
| - Args, Returns, and Raises are same as for
|
| - boto.storage_uri(), except there's no bucket_storage_uri_class arg.
|
| + Args, Returns, and Raises are same as for boto.storage_uri(), except there's
|
| + no bucket_storage_uri_class arg.
|
| """
|
| -
|
| return boto.storage_uri(uri_str, default_scheme, debug, validate,
|
| mock_storage_service.MockBucketStorageUri)
|
|
|