@pytest.fixture(scope="module")
def test_member():
// section to create service account to test policy updates.
rand = str(random.randint(0, 1000))
name = "python-test-" + rand
email = name + "@" + GCLOUD_PROJECT + ".iam.gserviceaccount.com"
member = "serviceAccount:" + email
service_accounts.create_service_account(
GCLOUD_PROJECT, name, "Py Test Account"
After Change
def test_member():
// section to create service account to test policy updates.
// we use the first portion of uuid4 because full version is too long.
name = "python-test-" + str(uuid.uuid4()).split("-")[0]
email = name + "@" + GCLOUD_PROJECT + ".iam.gserviceaccount.com"
member = "serviceAccount:" + email
service_accounts.create_service_account(
GCLOUD_PROJECT, name, "Py Test Account"