- Turn on foreign key constraint checking in the tests
- Change all ForeignKeyField's that refer to users to use our custom class, and mark those that allow robots - Change robot delete to only execute the subset of queries necessary to actually delete robots
This commit is contained in:
parent
8548538516
commit
158acd4f41
4 changed files with 104 additions and 24 deletions
|
@ -156,6 +156,9 @@ def setup_database_for_testing(testcase):
|
|||
initialize_database()
|
||||
populate_database()
|
||||
|
||||
# Enable foreign key constraints.
|
||||
model.db.obj.execute_sql('PRAGMA foreign_keys = ON;')
|
||||
|
||||
db_initialized_for_testing = True
|
||||
|
||||
# Create a savepoint for the testcase.
|
||||
|
|
Reference in a new issue