Skip to content

Commit e75e533

Browse files
Durgesh NinaveDurgesh Ninave
authored andcommitted
chore(secretmanager): update test assertions
1 parent 8b70c82 commit e75e533

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

secretmanager/snippets/regional_samples/snippets_test.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,6 @@ def test_create_regional_secret_with_label(
471471

472472

473473
def test_delete_regional_secret_annotation(
474-
regional_client: secretmanager_v1.SecretManagerServiceClient,
475474
project_id: str,
476475
location_id: str,
477476
regional_secret: Tuple[str, str],
@@ -482,11 +481,7 @@ def test_delete_regional_secret_annotation(
482481
project_id, location_id, secret_id, annotation_key
483482
)
484483
assert secret_id in secret.name
485-
with pytest.raises(exceptions.NotFound):
486-
name = f"projects/{project_id}/locations/{location_id}/secrets/{secret_id}/versions/latest"
487-
retry_client_access_regional_secret_version(
488-
regional_client, request={"name": name}
489-
)
484+
assert annotation_key not in secret.annotations
490485

491486

492487
def test_delete_regional_secret_labels(

secretmanager/snippets/snippets_test.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,17 +487,13 @@ def test_delete_secret(
487487

488488

489489
def test_delete_secret_annotation(
490-
client: secretmanager.SecretManagerServiceClient,
491490
secret: Tuple[str, str, str],
492491
annotation_key: str,
493492
) -> None:
494493
project_id, secret_id, _ = secret
495494
secret = delete_secret_annotation(project_id, secret_id, annotation_key)
496495
assert secret_id in secret.name
497-
with pytest.raises(exceptions.NotFound):
498-
print(f"{client}")
499-
name = f"projects/{project_id}/secrets/{secret_id}/versions/latest"
500-
retry_client_access_secret_version(client, request={"name": name})
496+
assert annotation_key not in secret.annotations
501497

502498

503499
def test_delete_secret_labels(

0 commit comments

Comments
 (0)