@@ -263,6 +263,34 @@ def test_reset_credentials(self):
263263 m .call_url , "/databases/mysql/instances/123/credentials/reset"
264264 )
265265
266+ def test_suspend (self ):
267+ """
268+ Test MySQL Database suspend logic.
269+ """
270+ with self .mock_post ("/databases/mysql/instances/123/suspend" ) as m :
271+ db = MySQLDatabase (self .client , 123 )
272+
273+ db .suspend ()
274+
275+ self .assertEqual (m .method , "post" )
276+ self .assertEqual (
277+ m .call_url , "/databases/mysql/instances/123/suspend"
278+ )
279+
280+ def test_resume (self ):
281+ """
282+ Test MySQL Database resume logic.
283+ """
284+ with self .mock_post ("/databases/mysql/instances/123/resume" ) as m :
285+ db = MySQLDatabase (self .client , 123 )
286+
287+ db .resume ()
288+
289+ self .assertEqual (m .method , "post" )
290+ self .assertEqual (
291+ m .call_url , "/databases/mysql/instances/123/resume"
292+ )
293+
266294
267295class PostgreSQLDatabaseTest (ClientBaseCase ):
268296 """
@@ -451,3 +479,31 @@ def test_reset_credentials(self):
451479 m .call_url ,
452480 "/databases/postgresql/instances/123/credentials/reset" ,
453481 )
482+
483+ def test_suspend (self ):
484+ """
485+ Test PostgreSQL Database suspend logic.
486+ """
487+ with self .mock_post ("/databases/postgresql/instances/123/suspend" ) as m :
488+ db = PostgreSQLDatabase (self .client , 123 )
489+
490+ db .suspend ()
491+
492+ self .assertEqual (m .method , "post" )
493+ self .assertEqual (
494+ m .call_url , "/databases/postgresql/instances/123/suspend"
495+ )
496+
497+ def test_resume (self ):
498+ """
499+ Test PostgreSQL Database resume logic.
500+ """
501+ with self .mock_post ("/databases/postgresql/instances/123/resume" ) as m :
502+ db = PostgreSQLDatabase (self .client , 123 )
503+
504+ db .resume ()
505+
506+ self .assertEqual (m .method , "post" )
507+ self .assertEqual (
508+ m .call_url , "/databases/postgresql/instances/123/resume"
509+ )
0 commit comments