mirror of
https://github.com/sprockets/sprockets.clients.dynamodb.git
synced 2024-11-23 11:19:54 +00:00
Test for the ResourceInUse exception when double creating
This commit is contained in:
parent
3e909eb2ba
commit
21bb49fb3a
1 changed files with 11 additions and 0 deletions
|
@ -129,6 +129,17 @@ class CreateTableTests(AsyncTestCase):
|
|||
with self.assertRaises(exceptions.ValidationException):
|
||||
yield self.client.create_table(definition)
|
||||
|
||||
@testing.gen_test
|
||||
def test_double_create(self):
|
||||
definition = self.generic_table_definition()
|
||||
response = yield self.client.create_table(definition)
|
||||
self.assertEqual(response['TableName'], definition['TableName'])
|
||||
self.assertIn(response['TableStatus'],
|
||||
[dynamodb.TABLE_ACTIVE,
|
||||
dynamodb.TABLE_CREATING])
|
||||
with self.assertRaises(exceptions.ResourceInUse):
|
||||
response = yield self.client.create_table(definition)
|
||||
|
||||
|
||||
class DeleteTableTests(AsyncTestCase):
|
||||
|
||||
|
|
Loading…
Reference in a new issue