diff --git a/gssapi/tests/test_raw.py b/gssapi/tests/test_raw.py index 18d60743..9bb94739 100644 --- a/gssapi/tests/test_raw.py +++ b/gssapi/tests/test_raw.py @@ -730,3 +730,23 @@ def test_basic_wrap_unwrap(self): unwrapped_message.should_be_a(bytes) unwrapped_message.shouldnt_be_empty() unwrapped_message.should_be(b'test message') + + +TEST_OIDS = {'SPNEGO': {'bytes': '\053\006\001\005\005\002', + 'string': ''}, + 'KRB5': {'bytes': '\052\206\110\206\367\022\001\002\002', + 'string': ''}, + 'KRB5_OLD': {'bytes': '\053\005\001\005\002', + 'string': ''}, + 'KRB5_WRONG': {'bytes': '\052\206\110\202\367\022\001\002\002', + 'string': ''}, + 'IAKERB': {'bytes': '\053\006\001\005\002\005', + 'string': ''}} + + +class TestOIDTransforms(unittest.TestCase): + def test_decode_from_bytes(self): + for oid in TEST_OIDS.values(): + o = gb.OID(elements=oid['bytes']) + text = repr(o) + text.should_be(oid['string'])