示例#1
0
 def test_from_dict_defaults(self):
     config = IndexConfig.from_dict({})
     self.assertIsNone(config.name)
     self.assertEqual(IndexType.SORTED, config.type)
     self.assertEqual([], config.attributes)
     self.assertEqual(QueryConstants.KEY_ATTRIBUTE_NAME,
                      config.bitmap_index_options.unique_key)
     self.assertEqual(UniqueKeyTransformation.OBJECT,
                      config.bitmap_index_options.unique_key_transformation)
示例#2
0
 def test_from_dict(self):
     with self.assertRaises(InvalidConfigurationError):
         IndexConfig.from_dict({"unknown_key": 1})