예제 #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]])
예제 #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]])
예제 #3
0
def delete_table(post):
    name = post[u'TableName']
    table = dynamodb.delete_table(name)

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

    return {'TableDescription': table.to_dict(verbose=False)}
예제 #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)