示例#1
0
 def test_from_dict_with_changes(self):
     options = BitmapIndexOptions.from_dict({
         "unique_key":
         QueryConstants.THIS_ATTRIBUTE_NAME,
     })
     self.assertEqual(QueryConstants.THIS_ATTRIBUTE_NAME,
                      options.unique_key)
     self.assertEqual(UniqueKeyTransformation.OBJECT,
                      options.unique_key_transformation)
示例#2
0
 def test_from_dict_defaults(self):
     options = BitmapIndexOptions.from_dict({})
     self.assertEqual(QueryConstants.KEY_ATTRIBUTE_NAME, options.unique_key)
     self.assertEqual(UniqueKeyTransformation.OBJECT,
                      options.unique_key_transformation)
示例#3
0
 def test_from_dict(self):
     with self.assertRaises(InvalidConfigurationError):
         BitmapIndexOptions.from_dict({"unknown_key": 1})