def test_nid(self): assert m2.obj_ln2nid("commonName") == m2.obj_txt2nid( "2.5.4.3"), "ln2nid and txt2nid mismatch" assert m2.obj_ln2nid("CN") == 0, "ln2nid on sn" assert m2.obj_sn2nid("CN") == m2.obj_ln2nid( "commonName"), "ln2nid and sn2nid mismatch" assert m2.obj_sn2nid("CN") == m2.obj_obj2nid(m2.obj_txt2obj( "CN", 0)), "obj2nid" assert m2.obj_txt2nid("__unknown") == 0, "__unknown"
def test_nid(self): self.assertEqual(m2.obj_ln2nid("commonName"), m2.obj_txt2nid("2.5.4.3"), "ln2nid and txt2nid mismatch") self.assertEqual(m2.obj_ln2nid("CN"), 0, "ln2nid on sn") self.assertEqual(m2.obj_sn2nid("CN"), m2.obj_ln2nid("commonName"), "ln2nid and sn2nid mismatch") self.assertEqual(m2.obj_sn2nid("CN"), m2.obj_obj2nid(m2.obj_txt2obj("CN", 0)), "obj2nid") self.assertEqual(m2.obj_txt2nid("__unknown"), 0, "__unknown")
def test_nid(self): assert m2.obj_ln2nid("commonName") == m2.obj_txt2nid("2.5.4.3"), "ln2nid and txt2nid mismatch" assert m2.obj_ln2nid("CN") == 0, "ln2nid on sn" assert m2.obj_sn2nid("CN") == m2.obj_ln2nid("commonName"), "ln2nid and sn2nid mismatch" assert m2.obj_sn2nid("CN") == m2.obj_obj2nid(m2.obj_txt2obj("CN", 0)), "obj2nid" assert m2.obj_txt2nid("__unknown") == 0, "__unknown"