From a5c6e9a89242bb42dbc98f29681d2f74aec12b02 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 23 Mar 2015 19:23:43 -0500 Subject: use kwargs for BasicConstraints creation Also check path_length using integer_types --- tests/test_x509_ext.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'tests/test_x509_ext.py') diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py index de3ca312..74d14c57 100644 --- a/tests/test_x509_ext.py +++ b/tests/test_x509_ext.py @@ -11,17 +11,17 @@ from cryptography import x509 class TestExtension(object): def test_not_an_oid(self): - bc = x509.BasicConstraints(False, None) + bc = x509.BasicConstraints(ca=False, path_length=None) with pytest.raises(TypeError): x509.Extension("notanoid", True, bc) def test_critical_not_a_bool(self): - bc = x509.BasicConstraints(False, None) + bc = x509.BasicConstraints(ca=False, path_length=None) with pytest.raises(TypeError): x509.Extension(x509.OID_BASIC_CONSTRAINTS, "notabool", bc) def test_repr(self): - bc = x509.BasicConstraints(False, None) + bc = x509.BasicConstraints(ca=False, path_length=None) ext = x509.Extension(x509.OID_BASIC_CONSTRAINTS, True, bc) assert repr(ext) == ( "" ) -- cgit v1.2.3