fixes pylint warnings;

adds more tests to load_verify_locations;
fixes data type when calling C functions;
fixes result verification when calling C functions.
This commit is contained in:
Moisés Guimarães
2016-11-15 12:56:35 -03:00
parent 7201435f2d
commit 760ddd14f5
7 changed files with 133 additions and 56 deletions

View File

@@ -17,9 +17,12 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# pylint: disable=missing-docstring, invalid-name, import-error
import unittest
import wolfssl
import ssl
import wolfssl
class TestSSLContext(unittest.TestCase):
@@ -34,8 +37,11 @@ class TestSSLContext(unittest.TestCase):
def test_load_cert_chain(self):
self.assertRaises(TypeError, self.ctx.load_cert_chain, None)
def test_load_verify_locations(self):
def test_load_verify_locations_raises(self):
self.assertRaises(TypeError, self.ctx.load_verify_locations, None)
def test_load_verify_locations_with_cafile(self):
self.ctx.load_verify_locations(cafile="../../../certs/ca-cert.pem")
class TestWolfSSLContext(TestSSLContext):
provider = wolfssl
provider = wolfssl