Exemple #1
0
 def test_create_global_includes_index(self):
     """Create a table with a global Includes index"""
     hash_key = DynamoKey("id", data_type=STRING)
     index_field = DynamoKey("name")
     index = GlobalIndex.include("name-index", index_field, includes=["foo", "bar"])
     table = Table("foobar", hash_key, global_indexes=[index])
     self.dynamo.create_table("foobar", hash_key, global_indexes=[index])
     desc = self.dynamo.describe_table("foobar")
     self.assertEqual(desc, table)
Exemple #2
0
 def test_create_global_includes_index(self):
     """ Create a table with a global Includes index """
     hash_key = DynamoKey('id', data_type=STRING)
     index_field = DynamoKey('name')
     index = GlobalIndex.include(
         'name-index', index_field, includes=['foo', 'bar'])
     table = Table('foobar', hash_key, global_indexes=[index])
     self.dynamo.create_table('foobar', hash_key, global_indexes=[index])
     desc = self.dynamo.describe_table('foobar')
     self.assertEqual(desc, table)
Exemple #3
0
 def test_create_global_includes_index(self):
     """ Create a table with a global Includes index """
     hash_key = DynamoKey('id', data_type=STRING)
     index_field = DynamoKey('name')
     index = GlobalIndex.include('name-index',
                                 index_field,
                                 includes=['foo', 'bar'])
     table = Table('foobar', hash_key, global_indexes=[index])
     self.dynamo.create_table('foobar', hash_key, global_indexes=[index])
     desc = self.dynamo.describe_table('foobar')
     self.assertEqual(desc, table)