Assert only gpgautoimport: True works

This commit is contained in:
Mihai Dinca 2016-05-30 13:05:25 +02:00
parent ced75e8e62
commit 42d8d4195c

View File

@ -479,6 +479,16 @@ class ZypperTestCase(TestCase):
):
zypper.mod_repo(name, **{'url': url})
zypper.__zypper__.xml.call.assert_not_called()
zypper.__zypper__.refreshable.xml.call.assert_not_called()
with zypper_patcher:
with self.assertRaisesRegexp(
Exception,
'Specified arguments did not result in modification of repo'
):
zypper.mod_repo(name, **{'url': url, 'gpgautoimport': 'a'})
zypper.__zypper__.xml.call.assert_not_called()
zypper.__zypper__.refreshable.xml.call.assert_not_called()
def test_repo_add_mod_noref(self):
'''