# Test adding to non unique index with identical multivalued index
# attributes
#
+
def test_index_multi_valued_identical_keys(self):
# 0 1 2 3 4 5
# 12345678901234567890123456789012345678901234567890
def test_try_subdb_index(self):
try:
self.l.add({"dn": "@INDEXLIST",
- "@IDX_LMDB_SUBDB": [b"1"],
- "@IDXONE": [b"1"],
- "@IDXONE": [b"1"],
- "@IDXGUID": [b"objectUUID"],
- "@IDX_DN_GUID": [b"GUID"],
+ "@IDX_LMDB_SUBDB": [b"1"],
+ "@IDXONE": [b"1"],
+ "@IDXGUID": [b"objectUUID"],
+ "@IDX_DN_GUID": [b"GUID"],
})
except ldb.LdbError as e:
code = e.args[0]
self.assertEqual(ldb.ERR_OPERATIONS_ERROR, code)
self.assertIn("sub-database index", string)
+
if __name__ == '__main__':
import unittest
unittest.TestProgram()