@@ -56,11 +56,7 @@ def setUpClass(cls):
5656
5757 @classmethod
5858 def tearDownClass (cls ):
59- try :
60- cleanup_resources (cls .apiclient , cls ._cleanup )
61- except Exception as e :
62- raise Exception ("Warning: Exception during cleanup : %s" % e )
63- return
59+ super (TestQuota , cls ).tearDownClass ()
6460
6561 def setUp (self ):
6662 self .apiclient = self .testClient .getApiClient ()
@@ -73,12 +69,7 @@ def setUp(self):
7369 return
7470
7571 def tearDown (self ):
76- try :
77- #Clean up, terminate the created templates
78- cleanup_resources (self .apiclient , self .cleanup )
79- except Exception as e :
80- raise Exception ("Warning: Exception during cleanup : %s" % e )
81- return
72+ super (TestQuota , self ).tearDown ()
8273
8374 #Check quotaTariffList API returning 22 items
8475 @attr (tags = ["smoke" , "advanced" ], required_hardware = "false" )
@@ -244,10 +235,9 @@ def test_06_quota(self):
244235 cmd .startdate = today
245236 response = self .apiclient .quotaBalance (cmd )
246237
247- self .debug ("Quota Balance on: %s" % response .startdate )
248- self .debug ("is: %s" % response .startquota )
238+ self .debug (f"Quota Balance: { response .balance } " )
249239
250- self .assertEqual ( response .startquota , 10 )
240+ self .assertEqual ( response .startquota , 0 , f"startQuota is supposed to be 0 but was { response . balance . startquota } " )
251241 return
252242
253243 #make credit deposit and check start and end date balances
@@ -267,9 +257,8 @@ def test_07_quota(self):
267257 cmd .enddate = today
268258 response = self .apiclient .quotaBalance (cmd )
269259
270- self .debug ("Quota Balance on: %s" % response .startdate )
271- self .debug ("is: %s" % response .startquota )
260+ self .debug ("Quota Balance: {response.balance}" )
272261
273- self .assertEqual ( response .startquota , 0 )
274- self .assertEqual ( response .endquota , 10 )
262+ self .assertEqual ( response .balance . startquota , 0 , f"startquota was supposed to be 0 but was { response . balance . startquota } " )
263+ self .assertEqual ( response .balance . endquota , 10 , f"endquota was supposed to be 10 but was { response . balance . endquota } " )
275264 return
0 commit comments