another bad url for assert_allowed test
This commit is contained in:
parent
5e19c06fce
commit
38c45ee124
1 changed files with 6 additions and 1 deletions
|
|
@ -81,14 +81,19 @@ class TestSCM(unittest.TestCase):
|
|||
bad = [
|
||||
"cvs://badserver/projects/42#ref",
|
||||
"svn://badserver/projects/42#ref",
|
||||
"git://maybeserver/badpath/project#1234",
|
||||
]
|
||||
for url in good:
|
||||
scm = SCM(url)
|
||||
scm.assert_allowed(allowed)
|
||||
for url in bad:
|
||||
scm = SCM(url)
|
||||
with self.assertRaises(koji.BuildError):
|
||||
try:
|
||||
scm.assert_allowed(allowed)
|
||||
except koji.BuildError:
|
||||
pass
|
||||
else:
|
||||
raise AssertionError("allowed bad url: %s" % url)
|
||||
|
||||
@mock.patch('logging.getLogger')
|
||||
def test_badrule(self, getLogger):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue