From 6581507f92ab43182cfa10510e6f9e16ebaf3793 Mon Sep 17 00:00:00 2001 From: Nick Bastin Date: Sun, 13 Dec 2015 06:46:15 -0800 Subject: Add bad input test for coverage of new validation --- tests/test_x509.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_x509.py b/tests/test_x509.py index 02201a37..c276f099 100644 --- a/tests/test_x509.py +++ b/tests/test_x509.py @@ -3251,6 +3251,10 @@ class TestObjectIdentifier(object): oid = x509.ObjectIdentifier("2.999.1") assert oid._name == 'Unknown OID' + def test_bad_input(self): + with pytest.raises(ValueError): + x509.ObjectIdentifier("notavalidform") + class TestName(object): def test_eq(self): -- cgit v1.2.3