mirror of
https://git.centos.org/centos/centpkg.git
synced 2025-02-23 08:12:55 +00:00
Update tests to look for warning
Signed-off-by: Troy Dawson <tdawson@redhat.com>
This commit is contained in:
parent
fff9db7053
commit
6434455336
1 changed files with 3 additions and 3 deletions
|
@ -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):
|
||||
|
@ -244,4 +244,4 @@ class TestIsFork(unittest.TestCase):
|
|||
@unittest.mock.patch.object(centpkg_git.repo.Repo, '__init__', new=lambda s, p: None)
|
||||
def test_upstream_url(self):
|
||||
d = DistGitDirectory(self.branchstring, 'binutils')
|
||||
self.assertFalse(d.is_fork())
|
||||
self.assertFalse(d.is_fork())
|
||||
|
|
Loading…
Add table
Reference in a new issue