Here is the insert command generated by test case.
INSERT
INTO "AUTH_USER" ("PASSWORD", "LAST_LOGIN", "IS_SUPERUSER", "USERNAME",
"FIRST_NAME", "LAST_NAME", "EMAIL", "IS_STAFF", "IS_ACTIVE",
"DATE_JOINED") VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)
Value : (None, None, True, u'superuser', None, None, None, False, True, u'2015-09-17 12:31:09.562000')
ibm_db_dbi::IntegrityError:
Statement Execute Failed: [IBM][CLI Driver][DB2/NT] SQL0407N
Assignment of a NULL value to a NOT NULL column "TBSPACEID=2,
TABLEID=24, COLNO=1" is not allowed. SQLSTATE=23502\r SQLCODE=-407
Except last_login none of the field are nullable .
But still DJango testcase generate insert statement as above and pass None as value which fails .
Why this happens ?.
Why correct non null values are not generated for non null field .