Skip to content

Commit 2618054

Browse files
committed
Refactor the update test method
1 parent fc5dc16 commit 2618054

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

securitycenter/snippets_management_api/security_health_analytics_custom_modules_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,11 @@ def test_list_security_health_analytics_custom_module():
255255
backoff.expo, (InternalServerError, ServiceUnavailable, NotFound), max_tries=3
256256
)
257257
def test_update_security_health_analytics_custom_module():
258-
259-
module_id = get_random_shared_module()
260258
parent = f"organizations/{ORGANIZATION_ID}/locations/{LOCATION}"
259+
response = security_health_analytics_custom_modules.create_security_health_analytics_custom_module(parent)
260+
module_id = extract_custom_module_id(response.name)
261+
add_module_to_cleanup(module_id)
262+
261263
# Retrieve the custom modules
262264
updated_custom_module = security_health_analytics_custom_modules.update_security_health_analytics_custom_module(parent, module_id)
263265

0 commit comments

Comments
 (0)