def test_identity_attribute_4(): a = Attribute(name="urn:oid:2.5.4.5", name_format=NAME_FORMAT_URI, friendly_name="serialNumber") assert utils.identity_attribute("name", a) == "urn:oid:2.5.4.5" # if there would be a map it would be serialNumber assert utils.identity_attribute("friendly", a) == "serialNumber"
def test_identity_attribute_1(): (forward, backward) = utils.parse_attribute_map( [full_path("attribute.map")]) a = Attribute(name="urn:oid:2.5.4.4", name_format=NAME_FORMAT_URI) assert utils.identity_attribute("name", a, forward) == "urn:oid:2.5.4.4" assert utils.identity_attribute("friendly", a, forward) == "surName"
def test_identity_attribute_1(): (forward, backward) = utils.parse_attribute_map([full_path("attribute.map")]) a = Attribute(name="urn:oid:2.5.4.4", name_format=NAME_FORMAT_URI) assert utils.identity_attribute("name", a, forward) == "urn:oid:2.5.4.4" assert utils.identity_attribute("friendly", a, forward) == "surName"
def test_identity_attribute_2(): (forward, backward) = utils.parse_attribute_map([full_path("attribute.map")]) a = Attribute(name="urn:oid:2.5.4.5", name_format=NAME_FORMAT_URI) assert utils.identity_attribute("name",a,forward) == "urn:oid:2.5.4.5" # if there would be a map it would be serialNumber assert utils.identity_attribute("friendly",a,forward) == "urn:oid:2.5.4.5"
def test_identity_attribute_2(): (forward, backward) = utils.parse_attribute_map(["attribute.map"]) a = Attribute(name="urn:oid:2.5.4.5", name_format=NAME_FORMAT_URI) assert utils.identity_attribute("name", a, forward) == "urn:oid:2.5.4.5" # if there would be a map it would be serialNumber assert utils.identity_attribute("friendly", a, forward) == "urn:oid:2.5.4.5"