Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
systemsmanagement:saltstack:bundle:next:Debian10
saltbundlepy-pycurl
pycurl-libssh.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pycurl-libssh.patch of Package saltbundlepy-pycurl
--- a/tests/ssh_key_cb_test.py +++ b/tests/ssh_key_cb_test.py @@ -33,8 +33,11 @@ class SshKeyCbTest(unittest.TestCase): def keyfunction(known_key, found_key, match): return pycurl.KHSTAT_FINE - self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts') - self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction) + try: + self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts') + self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction) + except pycurl.error as e: + self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0]) try: self.curl.perform() @@ -47,8 +50,11 @@ class SshKeyCbTest(unittest.TestCase): def keyfunction(known_key, found_key, match): return pycurl.KHSTAT_REJECT - self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts') - self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction) + try: + self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts') + self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction) + except pycurl.error as e: + self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0]) try: self.curl.perform() @@ -62,8 +68,11 @@ class SshKeyCbTest(unittest.TestCase): def keyfunction(known_key, found_key, match): return 'bogus' - self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts') - self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction) + try: + self.curl.setopt(pycurl.SSH_KNOWNHOSTS, '.known_hosts') + self.curl.setopt(pycurl.SSH_KEYFUNCTION, keyfunction) + except pycurl.error as e: + self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0]) try: self.curl.perform() @@ -82,9 +91,15 @@ class SshKeyCbUnsetTest(unittest.TestCas @util.min_libcurl(7, 19, 6) @util.guard_unknown_libcurl_option def test_keyfunction_none(self): - self.curl.setopt(pycurl.SSH_KEYFUNCTION, None) + try: + self.curl.setopt(pycurl.SSH_KEYFUNCTION, None) + except pycurl.error as e: + self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0]) @util.min_libcurl(7, 19, 6) @util.guard_unknown_libcurl_option def test_keyfunction_unset(self): - self.curl.unsetopt(pycurl.SSH_KEYFUNCTION) + try: + self.curl.unsetopt(pycurl.SSH_KEYFUNCTION) + except pycurl.error as e: + self.assertEqual(pycurl.E_UNKNOWN_OPTION, e.args[0])
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor