'Test creation of tables, make sure defaults are not left in the database'

@skipUnless(db.raises_default_errors, 'This    database    does    not    raise    errors    on    missing    defaults.')
def test_create_default(self):

    db.create_table('test_create_default', [('a', models.IntegerField()), ('b', models.IntegerField(default=17))])
    cursor = connection.cursor()
    self.assertRaises(IntegrityError, cursor.execute, 'INSERT    INTO    test_create_default(a)    VALUES    (17)')
