'Test that creating an existing table returns a DatabaseError'

def test_duplicate_table_error(self):

    cursor = connection.cursor()
    query = (u'CREATE    TABLE    %s    (id    INTEGER);' % models.Article._meta.db_table)
    with self.assertRaises(DatabaseError):
        cursor.execute(query)
