use djangos method of wiping sqlite3 tables

Django uses a reference graph to determine the order
in table deletions that occur. Do the same here.

This commit also adds in the `REGEXP` sqlite function,
exactly how Django uses it in its reference graphing.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-06-10 14:18:39 -07:00
parent 5de7ff64df
commit d18cfad63e
3 changed files with 62 additions and 1 deletions

View file

@ -200,6 +200,9 @@ def test_connection_execute_paramstyle_format():
aurweb.db.kill_engine()
aurweb.initdb.run(Args())
# Test SQLite route of clearing tables.
setup_test_db("Users", "Bans")
conn = db.Connection()
# First, test ? to %s format replacement.