@@ -62,7 +62,7 @@ def test_get_alert_definition(self):
6262 service_type = "dbaas"
6363 url = f"/monitor/services/{ service_type } /alert-definitions"
6464 with self .mock_get (url ) as mock_get :
65- alert = self .client .monitor .get_alert_definitions (
65+ alert = self .client .monitor .alert_definitions (
6666 service_type = service_type
6767 )
6868
@@ -116,23 +116,3 @@ def test_create_alert_definition(self):
116116 # fetch the same response from the client and assert
117117 resp = self .client .post (url , data = {})
118118 assert resp ["label" ] == "Created Alert"
119-
120- def test_update_alert_definition (self ):
121- service_type = "dbaas"
122- alert_id = 12345
123- url = f"/monitor/services/{ service_type } /alert-definitions/{ alert_id } "
124- result = {"id" : alert_id , "label" : "Updated Label" }
125-
126- with self .mock_put (result ) as mock_put :
127- alert = self .client .monitor .update_alert_definition (
128- service_type = service_type , alert_id = alert_id , label = "Updated Label"
129- )
130-
131- assert mock_put .call_url == url
132- assert mock_put .call_data ["label" ] == "Updated Label"
133-
134- assert isinstance (alert , AlertDefinition )
135- assert alert .id == alert_id
136-
137- resp = self .client .put (url , data = {})
138- assert resp ["label" ] == "Updated Label"
0 commit comments