'Test column renaming'

def test_table_rename(self):

    cursor = connection.cursor()
    db.create_table('testtr', [('spam', models.BooleanField(default=False))])
    cursor.execute('SELECT    spam    FROM    testtr')
    db.rename_table('testtr', 'testtr2')
    cursor.execute('SELECT    spam    FROM    testtr2')
    db.commit_transaction()
    db.start_transaction()
    try:
        cursor.execute('SELECT    spam    FROM    testtr')
    except:
        pass
    else:
        self.fail('Just-renamed    column    could    be    selected!')
    db.rollback_transaction()
    db.delete_table('testtr2')
    db.start_transaction()
