Gate: Fixed an Unauthorized error on api tests

The error is caused by an incorrect teardown order in baymodel tests.
The teardown in super class will delete the credential, so it should
be called after the baymodel is deleted.

Change-Id: I9a022122c309fe6e2e74f744f196a67beec1f884
Closes-Bug: #1534641
This commit is contained in:
Hongbin Lu 2016-01-15 10:51:18 -05:00
parent 628f7c4239
commit 53a1177539
1 changed files with 1 additions and 1 deletions

View File

@ -37,10 +37,10 @@ class BayModelTest(base.BaseMagnumTest):
request_type='baymodel')
def tearDown(self):
super(BayModelTest, self).tearDown()
for baymodel_id in self.baymodels:
self._delete_baymodel(baymodel_id)
self.baymodels.remove(baymodel_id)
super(BayModelTest, self).tearDown()
def _create_baymodel(self, baymodel_model):
resp, model = self.baymodel_client.post_baymodel(baymodel_model)