6c7f63e58534ff60c524324a1cf8628c838df772,storage/cloud-client/iam_test.py,,bucket,#,34

Before Change



@pytest.fixture
def bucket():
    bucket_name = "test-iam-" + str(int(time.time()))
    bucket = storage.Client().create_bucket(bucket_name)
    bucket.iam_configuration.uniform_bucket_level_access_enabled = True
    bucket.patch()
    yield bucket

After Change



@pytest.fixture
def bucket():
    bucket = None
    while bucket is None or bucket.exists():
        bucket_name = "test-iam-{}".format(uuid.uuid4())
        bucket = storage.Client().bucket(bucket_name)
    bucket.create()
    bucket.iam_configuration.uniform_bucket_level_access_enabled = True
    bucket.patch()
    yield bucket
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 6c7f63e58534ff60c524324a1cf8628c838df772
Time: 2020-03-05
Author: crwilcox@google.com
File Name: storage/cloud-client/iam_test.py
Class Name:
Method Name: bucket


Project Name: AxeldeRomblay/MLBox
Commit Name: 8768184ae39b420292acc25eda9ae43c3af0752d
Time: 2017-06-20
Author: axelderomblay@gmail.com
File Name: python-package/mlbox/model/supervised/regression/stacking_regressor.py
Class Name: StackingRegressor
Method Name: fit_transform


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 646012c26db9335f69216c5d8656090c4211f323
Time: 2020-03-05
Author: crwilcox@google.com
File Name: storage/cloud-client/bucket_lock_test.py
Class Name:
Method Name: bucket