From 5e5e442a321903cc23bdca7f54955528c6092d5c Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Fri, 15 Jan 2016 10:51:18 -0500 Subject: [PATCH] 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 --- magnum/tests/functional/api/v1/test_baymodel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magnum/tests/functional/api/v1/test_baymodel.py b/magnum/tests/functional/api/v1/test_baymodel.py index 854b77e..e909d7c 100644 --- a/magnum/tests/functional/api/v1/test_baymodel.py +++ b/magnum/tests/functional/api/v1/test_baymodel.py @@ -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)