Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.0:Staging:F
python-pycurl
pycurl-libssh.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pycurl-libssh.patch of Package python-pycurl
Index: pycurl-7.43.0.1/tests/ssh_key_cb_test.py =================================================================== --- pycurl-7.43.0.1.orig/tests/ssh_key_cb_test.py 2017-12-03 20:03:17.000000000 +0100 +++ pycurl-7.43.0.1/tests/ssh_key_cb_test.py 2018-01-30 16:56:42.499858079 +0100 @@ -30,8 +30,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() @@ -44,8 +47,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() @@ -58,8 +64,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() @@ -77,8 +86,14 @@ class SshKeyCbUnsetTest(unittest.TestCas @util.min_libcurl(7, 19, 6) 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) 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