Esempio n. 1
0
    def test_delete_table(self, m_schedule):
        from ddbmock import config
        from ddbmock.database import dynamodb

        dynamodb.delete_table(TABLE_NAME)
        dynamodb.data[TABLE_NAME].delete.assert_called_with()
        m_schedule.assert_called_with(config.DELAY_DELETING, dynamodb._internal_delete_table, [dynamodb.data[TABLE_NAME]])
Esempio n. 2
0
    def test_delete_table(self, m_schedule):
        from ddbmock import config
        from ddbmock.database import dynamodb

        dynamodb.delete_table(TABLE_NAME)
        dynamodb.data[TABLE_NAME].delete.assert_called_with()
        m_schedule.assert_called_with(config.DELAY_DELETING,
                                      dynamodb._internal_delete_table,
                                      [dynamodb.data[TABLE_NAME]])
Esempio n. 3
0
def delete_table(post):
    name = post[u'TableName']
    table = dynamodb.delete_table(name)

    return {
        'TableDescription': table.to_dict(verbose=False)
    }
Esempio n. 4
0
def delete_table(post):
    name = post[u'TableName']
    table = dynamodb.delete_table(name)

    return {'TableDescription': table.to_dict(verbose=False)}
Esempio n. 5
0
    def test_delete_table(self):
        from ddbmock.database import dynamodb

        dynamodb.delete_table(TABLE_NAME)
        dynamodb.data[TABLE_NAME].delete.assert_called_with(callback=dynamodb._internal_delete_table)