OPSI.ldaptor.test.test_pureldap module

Test cases for ldaptor.protocols.pureldap module.

class OPSI.ldaptor.test.test_pureldap.KnownValues(methodName='runTest')

Bases: twisted.trial._asynctest.TestCase

knownValues = ((<class 'OPSI.ldaptor.protocols.pureldap.LDAPModifyRequest'>, [], {'modification': [BERSequence(value=[BEREnumerated(value=0), BERSequence(value=[LDAPAttributeDescription(value='bar'), BERSet(value=[LDAPString(value='a'), LDAPString(value='b')])])])], 'object': 'cn=foo, dc=example, dc=com'}, None, [102, 50, 4, 26, 99, 110, 61, 102, 111, 111, 44, 32, 100, 99, 61, 101, 120, 97, 109, 112, 108, 101, 44, 32, 100, 99, 61, 99, 111, 109, 48, 20, 48, 18, 10, 1, 0, 48, 13, 4, 3, 98, 97, 114, 49, 6, 4, 1, 97, 4, 1, 98]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPModifyRequest'>, [], {'modification': [BERSequence(value=[BEREnumerated(value=1L), BERSequence(value=[BEROctetString(value='bar'), BERSet(value=[])])])], 'object': 'cn=foo, dc=example, dc=com'}, None, [102, 44, 4, 26, 99, 110, 61, 102, 111, 111, 44, 32, 100, 99, 61, 101, 120, 97, 109, 112, 108, 101, 44, 32, 100, 99, 61, 99, 111, 109, 48, 14, 48, 12, 10, 1, 1, 48, 7, 4, 3, 98, 97, 114, 49, 0]), (<class OPSI.ldaptor.protocols.pureldap.LDAPFilter_not>, [], {'value': LDAPFilter_present(value='foo')}, <LDAPBERDecoderContext_Filter identities={0x80: LDAPFilter_and, 0x81: LDAPFilter_or, 0x82: LDAPFilter_not, 0x83: LDAPFilter_equalityMatch, 0x84: LDAPFilter_substrings, 0x85: LDAPFilter_greaterOrEqual, 0x86: LDAPFilter_lessOrEqual, 0x87: LDAPFilter_present, 0x88: LDAPFilter_approxMatch, 0x89: LDAPFilter_extensibleMatch} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None>, [162, 5, 135, 3, 102, 111, 111]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPFilter_or'>, [], {'value': [LDAPFilter_equalityMatch(attributeDesc=LDAPAttributeDescription(value='cn'), assertionValue=LDAPAssertionValue(value='foo')), LDAPFilter_equalityMatch(attributeDesc=LDAPAttributeDescription(value='uid'), assertionValue=LDAPAssertionValue(value='foo'))]}, <LDAPBERDecoderContext_Filter identities={0x80: LDAPFilter_and, 0x81: LDAPFilter_or, 0x82: LDAPFilter_not, 0x83: LDAPFilter_equalityMatch, 0x84: LDAPFilter_substrings, 0x85: LDAPFilter_greaterOrEqual, 0x86: LDAPFilter_lessOrEqual, 0x87: LDAPFilter_present, 0x88: LDAPFilter_approxMatch, 0x89: LDAPFilter_extensibleMatch} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None>, [161, 23, 163, 9, 4, 2, 99, 110, 4, 3, 102, 111, 111, 163, 10, 4, 3, 117, 105, 100, 4, 3, 102, 111, 111]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPFilter_and'>, [], {'value': [LDAPFilter_equalityMatch(attributeDesc=LDAPAttributeDescription(value='cn'), assertionValue=LDAPAssertionValue(value='foo')), LDAPFilter_equalityMatch(attributeDesc=LDAPAttributeDescription(value='uid'), assertionValue=LDAPAssertionValue(value='foo'))]}, <LDAPBERDecoderContext_Filter identities={0x80: LDAPFilter_and, 0x81: LDAPFilter_or, 0x82: LDAPFilter_not, 0x83: LDAPFilter_equalityMatch, 0x84: LDAPFilter_substrings, 0x85: LDAPFilter_greaterOrEqual, 0x86: LDAPFilter_lessOrEqual, 0x87: LDAPFilter_present, 0x88: LDAPFilter_approxMatch, 0x89: LDAPFilter_extensibleMatch} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None>, [160, 23, 163, 9, 4, 2, 99, 110, 4, 3, 102, 111, 111, 163, 10, 4, 3, 117, 105, 100, 4, 3, 102, 111, 111]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPModifyDNRequest'>, [], {'newrdn': 'uid=bar', 'entry': 'cn=foo,dc=example,dc=com', 'deleteoldrdn': 0}, None, [108, 38, 4, 24, 99, 110, 61, 102, 111, 111, 44, 100, 99, 61, 101, 120, 97, 109, 112, 108, 101, 44, 100, 99, 61, 99, 111, 109, 4, 7, 117, 105, 100, 61, 98, 97, 114, 1, 1, 0]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPModifyDNRequest'>, [], {'newrdn': 'uid=aoue', 'entry': 'cn=aoue,dc=example,dc=com', 'newSuperior': 'ou=People,dc=example,dc=com', 'deleteoldrdn': 0}, None, [108, 69, 4, 25, 99, 110, 61, 97, 111, 117, 101, 44, 100, 99, 61, 101, 120, 97, 109, 112, 108, 101, 44, 100, 99, 61, 99, 111, 109, 4, 8, 117, 105, 100, 61, 97, 111, 117, 101, 1, 1, 0, 128, 27, 111, 117, 61, 80, 101, 111, 112, 108, 101, 44, 100, 99, 61, 101, 120, 97, 109, 112, 108, 101, 44, 100, 99, 61, 99, 111, 109]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPSearchRequest'>, [], {'baseObject': 'dc=yoja,dc=example,dc=com'}, None, [99, 57, 4, 25, 100, 99, 61, 121, 111, 106, 97, 44, 100, 99, 61, 101, 120, 97, 109, 112, 108, 101, 44, 100, 99, 61, 99, 111, 109, 10, 1, 2, 10, 1, 0, 2, 1, 0, 2, 1, 0, 1, 1, 0, 135, 11, 111, 98, 106, 101, 99, 116, 67, 108, 97, 115, 115, 48, 0]), (<class OPSI.ldaptor.protocols.pureldap.LDAPUnbindRequest>, [], {}, None, [66, 0]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPSearchResultDone'>, [], {'resultCode': 0}, None, [101, 7, 10, 1, 0, 4, 0, 4, 0]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPSearchResultDone'>, [], {'resultCode': 0, 'matchedDN': 'dc=foo,dc=example,dc=com'}, None, [101, 31, 10, 1, 0, 4, 24, 100, 99, 61, 102, 111, 111, 44, 100, 99, 61, 101, 120, 97, 109, 112, 108, 101, 44, 100, 99, 61, 99, 111, 109, 4, 0]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPSearchResultDone'>, [], {'errorMessage': 'the foobar was fubar', 'resultCode': 0, 'matchedDN': 'dc=foo,dc=example,dc=com'}, None, [101, 51, 10, 1, 0, 4, 24, 100, 99, 61, 102, 111, 111, 44, 100, 99, 61, 101, 120, 97, 109, 112, 108, 101, 44, 100, 99, 61, 99, 111, 109, 4, 20, 116, 104, 101, 32, 102, 111, 111, 98, 97, 114, 32, 119, 97, 115, 32, 102, 117, 98, 97, 114]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPSearchResultDone'>, [], {'resultCode': 0, 'errorMessage': 'the foobar was fubar'}, None, [101, 27, 10, 1, 0, 4, 0, 4, 20, 116, 104, 101, 32, 102, 111, 111, 98, 97, 114, 32, 119, 97, 115, 32, 102, 117, 98, 97, 114]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPMessage'>, [], {'id': 42, 'value': LDAPBindRequest(version=3, dn='', auth='')}, <LDAPBERDecoderContext_TopLevel identities={0x10: LDAPMessage} fallback=None inherit=<LDAPBERDecoderContext_LDAPMessage identities={0x80: LDAPControls} fallback=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None> inherit=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None>>>, [48, 12, 2, 1, 42, 96, 7, 2, 1, 3, 4, 0, 128, 0]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPControl'>, [], {'controlType': '1.2.3.4'}, None, [48, 9, 4, 7, 49, 46, 50, 46, 51, 46, 52]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPControl'>, [], {'controlType': '1.2.3.4', 'criticality': True}, None, [48, 12, 4, 7, 49, 46, 50, 46, 51, 46, 52, 1, 1, 255]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPControl'>, [], {'controlValue': 'silly', 'controlType': '1.2.3.4', 'criticality': True}, None, [48, 19, 4, 7, 49, 46, 50, 46, 51, 46, 52, 1, 1, 255, 4, 5, 115, 105, 108, 108, 121]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPMessage'>, [], {'controls': [('1.2.3.4', None, None), ('2.3.4.5', False), ('3.4.5.6', True, '\x00\x01\x02\xff')], 'id': 42, 'value': LDAPBindRequest(version=3, dn='', auth='')}, <LDAPBERDecoderContext_TopLevel identities={0x10: LDAPMessage} fallback=None inherit=<LDAPBERDecoderContext_LDAPMessage identities={0x80: LDAPControls} fallback=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None> inherit=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None>>>, [48, 59, 2, 1, 42, 96, 7, 2, 1, 3, 4, 0, 128, 0, 160, 45, 48, 9, 4, 7, 49, 46, 50, 46, 51, 46, 52, 48, 12, 4, 7, 50, 46, 51, 46, 52, 46, 53, 1, 1, 0, 48, 18, 4, 7, 51, 46, 52, 46, 53, 46, 54, 1, 1, 255, 4, 4, 0, 1, 2, 255]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPFilter_equalityMatch'>, [], {'assertionValue': LDAPAssertionValue(value='foo'), 'attributeDesc': LDAPAttributeDescription(value='cn')}, <LDAPBERDecoderContext_Filter identities={0x80: LDAPFilter_and, 0x81: LDAPFilter_or, 0x82: LDAPFilter_not, 0x83: LDAPFilter_equalityMatch, 0x84: LDAPFilter_substrings, 0x85: LDAPFilter_greaterOrEqual, 0x86: LDAPFilter_lessOrEqual, 0x87: LDAPFilter_present, 0x88: LDAPFilter_approxMatch, 0x89: LDAPFilter_extensibleMatch} fallback=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None> inherit=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None>>, [163, 9, 4, 2, 99, 110, 4, 3, 102, 111, 111]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPFilter_or'>, [[LDAPFilter_equalityMatch(attributeDesc=LDAPAttributeDescription(value='cn'), assertionValue=LDAPAssertionValue(value='foo')), LDAPFilter_equalityMatch(attributeDesc=LDAPAttributeDescription(value='uid'), assertionValue=LDAPAssertionValue(value='foo')), LDAPFilter_equalityMatch(attributeDesc=LDAPAttributeDescription(value='mail'), assertionValue=LDAPAssertionValue(value='foo')), LDAPFilter_substrings(type='mail', substrings=[LDAPFilter_substrings_initial(value='foo@')])]], {}, <LDAPBERDecoderContext_Filter identities={0x80: LDAPFilter_and, 0x81: LDAPFilter_or, 0x82: LDAPFilter_not, 0x83: LDAPFilter_equalityMatch, 0x84: LDAPFilter_substrings, 0x85: LDAPFilter_greaterOrEqual, 0x86: LDAPFilter_lessOrEqual, 0x87: LDAPFilter_present, 0x88: LDAPFilter_approxMatch, 0x89: LDAPFilter_extensibleMatch} fallback=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None> inherit=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None>>, [161, 52, 163, 9, 4, 2, 99, 110, 4, 3, 102, 111, 111, 163, 10, 4, 3, 117, 105, 100, 4, 3, 102, 111, 111, 163, 11, 4, 4, 109, 97, 105, 108, 4, 3, 102, 111, 111, 164, 14, 4, 4, 109, 97, 105, 108, 48, 6, 128, 4, 102, 111, 111, 64]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPSearchRequest'>, [], {'derefAliases': 0, 'timeLimit': 0, 'baseObject': 'dc=example,dc=com', 'sizeLimit': 1, 'scope': 2, 'attributes': [''], 'filter': LDAPFilter_or(value=[LDAPFilter_equalityMatch(attributeDesc=LDAPAttributeDescription(value='cn'), assertionValue=LDAPAssertionValue(value='foo')), LDAPFilter_equalityMatch(attributeDesc=LDAPAttributeDescription(value='uid'), assertionValue=LDAPAssertionValue(value='foo')), LDAPFilter_equalityMatch(attributeDesc=LDAPAttributeDescription(value='mail'), assertionValue=LDAPAssertionValue(value='foo')), LDAPFilter_substrings(type='mail', substrings=[LDAPFilter_substrings_initial(value='foo@')])]), 'typesOnly': False}, <LDAPBERDecoderContext_LDAPMessage identities={0x80: LDAPControls} fallback=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None> inherit=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None>>, [99, 92, 4, 17, 100, 99, 61, 101, 120, 97, 109, 112, 108, 101, 44, 100, 99, 61, 99, 111, 109, 10, 1, 2, 10, 1, 0, 2, 1, 1, 2, 1, 0, 1, 1, 0, 161, 52, 163, 9, 4, 2, 99, 110, 4, 3, 102, 111, 111, 163, 10, 4, 3, 117, 105, 100, 4, 3, 102, 111, 111, 163, 11, 4, 4, 109, 97, 105, 108, 4, 3, 102, 111, 111, 164, 14, 4, 4, 109, 97, 105, 108, 48, 6, 128, 4, 102, 111, 111, 64, 48, 2, 4, 0]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPMessage'>, [], {'id': 1L, 'value': LDAPSearchRequest(baseObject='dc=example,dc=com', scope=2, derefAliases=0, sizeLimit=1, timeLimit=0, typesOnly=False, filter=LDAPFilter_or(value=[LDAPFilter_equalityMatch(attributeDesc=LDAPAttributeDescription(value='cn'), assertionValue=LDAPAssertionValue(value='foo')), LDAPFilter_equalityMatch(attributeDesc=LDAPAttributeDescription(value='uid'), assertionValue=LDAPAssertionValue(value='foo')), LDAPFilter_equalityMatch(attributeDesc=LDAPAttributeDescription(value='mail'), assertionValue=LDAPAssertionValue(value='foo')), LDAPFilter_substrings(type='mail', substrings=[LDAPFilter_substrings_initial(value='foo@')])]), attributes=[''])}, <LDAPBERDecoderContext_TopLevel identities={0x10: LDAPMessage} fallback=None inherit=<LDAPBERDecoderContext_LDAPMessage identities={0x80: LDAPControls} fallback=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None> inherit=<LDAPBERDecoderContext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEntry, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPModifyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPDelRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDAPModifyDNResponse, 0x83: LDAPReferral, 0x57: LDAPExtendedRequest, 0x58: LDAPExtendedResponse} fallback=<BERDecoderContext identities={0x01: BERBoolean, 0x02: BERInteger, 0x04: BEROctetString, 0x05: BERNull, 0x0a: BEREnumerated, 0x10: BERSequence, 0x11: BERSet} fallback=None inherit=None> inherit=None>>>, [48, 97, 2, 1, 1, 99, 92, 4, 17, 100, 99, 61, 101, 120, 97, 109, 112, 108, 101, 44, 100, 99, 61, 99, 111, 109, 10, 1, 2, 10, 1, 0, 2, 1, 1, 2, 1, 0, 1, 1, 0, 161, 52, 163, 9, 4, 2, 99, 110, 4, 3, 102, 111, 111, 163, 10, 4, 3, 117, 105, 100, 4, 3, 102, 111, 111, 163, 11, 4, 4, 109, 97, 105, 108, 4, 3, 102, 111, 111, 164, 14, 4, 4, 109, 97, 105, 108, 48, 6, 128, 4, 102, 111, 111, 64, 48, 2, 4, 0]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPExtendedRequest'>, [], {'requestName': '42.42.42', 'requestValue': 'foo'}, None, [119, 15, 128, 8, 52, 50, 46, 52, 50, 46, 52, 50, 129, 3, 102, 111, 111]))
testFromLDAP()

LDAPClass(encoded=”...”) should give known result with known input

testPartial()

LDAPClass(encoded=”...”) with too short input should throw BERExceptionInsufficientData

testToLDAP()

str(LDAPClass(...)) should give known result with known input

class OPSI.ldaptor.test.test_pureldap.Substrings(methodName='runTest')

Bases: twisted.trial._asynctest.TestCase

test_length()

LDAPFilter_substrings.substrings behaves like a proper list.

class OPSI.ldaptor.test.test_pureldap.TestEquality(methodName='runTest')

Bases: twisted.trial._asynctest.TestCase

testEquality()

LDAP objects equal LDAP objects with same type and content

testInEquality()

LDAP objects do not equal LDAP objects with different type or content

valuesToTest = ((<class 'OPSI.ldaptor.protocols.pureldap.LDAPFilter_equalityMatch'>, [LDAPAttributeDescription(value='cn'), LDAPAssertionValue(value='foo')]), (<class 'OPSI.ldaptor.protocols.pureldap.LDAPFilter_equalityMatch'>, [LDAPAttributeDescription(value='cn'), LDAPAssertionValue(value='bar')]), (<class OPSI.ldaptor.protocols.pureber.BERInteger>, [0]))
OPSI.ldaptor.test.test_pureldap.l(s)

Split a string to ord’s of chars.

OPSI.ldaptor.test.test_pureldap.s(*l)

Join all members of list to a string. Integer members are chr()ed