Fixed null constraint error in testdb.py