11from test .unit .base import ClientBaseCase
2+ from linode_api4 .objects import (
3+ Dashboard ,
4+ )
25import datetime
36
4- class MonitorSupportedServicesTest (ClientBaseCase ):
7+ class MonitorTest (ClientBaseCase ):
58 """
69 Tests the methods of MonitorServiceSupported class
710 """
@@ -19,7 +22,7 @@ def test_dashboard_by_ID(self):
1922 """
2023 Test the dashboard by ID API
2124 """
22- dashboard = self .client .monitor . dashboard_by_ID ( dashboard_id = 1 )
25+ dashboard = self .client .load ( Dashboard , 1 )
2326 self .assertEqual (dashboard .type , "standard" )
2427 self .assertEqual (dashboard .created , datetime .datetime (2024 , 10 , 10 , 5 , 1 , 58 ))
2528 self .assertEqual (dashboard .id , 1 )
@@ -37,7 +40,7 @@ def test_dashboard_by_ID(self):
3740
3841
3942 def test_dashboard_by_service_type (self ):
40- dashboards = self .client .monitor .dashboard_by_service (service_type = "dbaas" )
43+ dashboards = self .client .monitor .dashboards_by_service (service_type = "dbaas" )
4144 self .assertEqual (dashboards [0 ].type , "standard" )
4245 self .assertEqual (dashboards [0 ].created , datetime .datetime (2024 , 10 , 10 , 5 , 1 , 58 ))
4346 self .assertEqual (dashboards [0 ].id , 1 )
@@ -89,7 +92,7 @@ def test_metric_definitions(self):
8992 self .assertEqual (metrics [0 ].dimensions [0 ].label , "Node Type" )
9093 self .assertEqual (metrics [0 ].dimensions [0 ].values ,["primary" , "secondary" ])
9194
92- def create_token (self ):
95+ def test_create_token (self ):
9396
9497 with self .mock_post ("/monitor/services/dbaas/token" ) as m :
9598 self .client .monitor .create_token (service_type = "dbaas" , entity_ids = [189690 ,188020 ])
0 commit comments