@@ -13,7 +13,7 @@ def test_supported_services(self):
1313 """
1414 Test the services supported by monitor
1515 """
16- service = self .client .monitor_service .services ()
16+ service = self .client .monitor .services ()
1717 self .assertEqual (len (service ), 1 )
1818 self .assertEqual (service [0 ].label , "Databases" )
1919 self .assertEqual (service [0 ].service_type , "dbaas" )
@@ -43,9 +43,7 @@ def test_dashboard_by_ID(self):
4343 self .assertEqual (dashboard .widgets [0 ].y_label , "cpu_usage" )
4444
4545 def test_dashboard_by_service_type (self ):
46- dashboards = self .client .monitor_service .dashboards (
47- service_type = "dbaas"
48- )
46+ dashboards = self .client .monitor .dashboards (service_type = "dbaas" )
4947 self .assertEqual (dashboards [0 ].type , "standard" )
5048 self .assertEqual (
5149 dashboards [0 ].created , datetime .datetime (2024 , 10 , 10 , 5 , 1 , 58 )
@@ -66,7 +64,7 @@ def test_dashboard_by_service_type(self):
6664 self .assertEqual (dashboards [0 ].widgets [0 ].y_label , "cpu_usage" )
6765
6866 def test_get_all_dashboards (self ):
69- dashboards = self .client .monitor_service .dashboards ()
67+ dashboards = self .client .monitor .dashboards ()
7068 self .assertEqual (dashboards [0 ].type , "standard" )
7169 self .assertEqual (
7270 dashboards [0 ].created , datetime .datetime (2024 , 10 , 10 , 5 , 1 , 58 )
@@ -87,15 +85,13 @@ def test_get_all_dashboards(self):
8785 self .assertEqual (dashboards [0 ].widgets [0 ].y_label , "cpu_usage" )
8886
8987 def test_specific_service_details (self ):
90- data = self .client .monitor_service .services (service_type = "dbaas" )
88+ data = self .client .monitor .services (service_type = "dbaas" )
9189 self .assertEqual (data [0 ].label , "Databases" )
9290 self .assertEqual (data [0 ].service_type , "dbaas" )
9391
9492 def test_metric_definitions (self ):
9593
96- metrics = self .client .monitor_service .metric_definitions (
97- service_type = "dbaas"
98- )
94+ metrics = self .client .monitor .metric_definitions (service_type = "dbaas" )
9995 self .assertEqual (
10096 metrics [0 ].available_aggregate_functions ,
10197 ["max" , "avg" , "min" , "sum" ],
@@ -115,7 +111,7 @@ def test_metric_definitions(self):
115111 def test_create_token (self ):
116112
117113 with self .mock_post ("/monitor/services/dbaas/token" ) as m :
118- self .client .monitor_service .create_token (
114+ self .client .monitor .create_token (
119115 service_type = "dbaas" , entity_ids = [189690 , 188020 ]
120116 )
121117 self .assertEqual (m .return_dct ["token" ], "abcdefhjigkfghh" )
0 commit comments