Update tests to look for warning

Signed-off-by: Troy Dawson <tdawson@redhat.com>
This commit is contained in:
Troy Dawson 2024-06-21 11:42:40 -07:00
parent fff9db7053
commit 6434455336

View file

@ -13,11 +13,11 @@ class TestDistGitNothing(unittest.TestCase):
with self.assertRaises(TypeError):
d = DistGitDirectory()
class TestDistGitInvalid(unittest.TestCase):
class TestDistGitInvalid(unittest.TestCase, CatchWarningsMixin):
def test_invalid_branchstring_raises(self):
self.branchstring = 'nope-not-a-branch'
with self.assertRaises(ValueError):
with self.assertRaises(UserWarning):
self.d = DistGitDirectory(self.branchstring)
class TestDistgitOnlySig(unittest.TestCase):