tests/OBSLocal: tearDown(): ensure user is Admin before cleanup.

Without this all cleanup fails which can cause leakage between test runs
that utilize the same entity names.
This commit is contained in:
Jimmy Berry 2019-11-01 14:41:54 -05:00
parent 65e23771b6
commit 3c1b01695e

View File

@ -55,6 +55,10 @@ class TestCase(unittest.TestCase):
self.apiurl = conf.config['apiurl']
self.assertOBS()
def tearDown(self):
# Ensure admin user so that tearDown cleanup succeeds.
self.osc_user('Admin')
def assertOBS(self):
url = makeurl(self.apiurl, ['about'])
root = ET.parse(http_GET(url)).getroot()