more missing tearDowns

This commit is contained in:
Mike McLean 2024-07-09 21:42:03 -04:00 committed by Tomas Kopecek
parent 690ed8cf01
commit 95dacbe785
3 changed files with 10 additions and 0 deletions

View file

@ -157,6 +157,9 @@ class TestWatchLogsCLI(utils.CliTestCase):
%s: error: {message}
""" % (self.progname, self.progname)
def tearDown(self):
mock.patch.stopall()
def test_handle_watch_task_help(self):
self.assert_help(
anon_handle_watch_task,

View file

@ -101,9 +101,13 @@ class TestGetUser(DBQueryTestCase):
class TestGetUserByKrbPrincipal(unittest.TestCase):
def setUp(self):
self.get_user = mock.patch('kojihub.kojihub.get_user').start()
def tearDown(self):
mock.patch.stopall()
def test_wrong_type_krb_principal(self):
krb_principal = ['test-user']
with self.assertRaises(koji.GenericError) as cm:

View file

@ -221,6 +221,9 @@ class TestGetTag(unittest.TestCase):
self.queries = []
self.tagname = 'test-tag'
def tearDown(self):
mock.patch.stopall()
def test_get_tag_invalid_taginfo(self):
taginfo = {'test-tag': 'value'}
with self.assertRaises(koji.GenericError) as ex: