dump more test data for debug
gitea/wcs/pipeline/head There was a failure building this commit
Details
gitea/wcs/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
d5036ed141
commit
02b9ecf665
|
@ -1191,9 +1191,12 @@ def test_search_tokens_purge(pub):
|
|||
# purge garbage from other tests
|
||||
sql.purge_obsolete_search_tokens()
|
||||
|
||||
FormDef.wipe()
|
||||
cur.execute('SELECT count(*) FROM wcs_search_tokens;')
|
||||
start = cur.fetchone()[0]
|
||||
|
||||
cur.execute("SELECT * FROM wcs_search_tokens;")
|
||||
print(cur.fetchall())
|
||||
# define a new table
|
||||
test_formdef = FormDef()
|
||||
test_formdef.name = 'tableSelectFTStokens'
|
||||
|
@ -1204,6 +1207,9 @@ def test_search_tokens_purge(pub):
|
|||
cur.execute('SELECT count(*) FROM wcs_search_tokens;')
|
||||
assert cur.fetchone()[0] == start + 1
|
||||
|
||||
cur.execute("SELECT * FROM wcs_search_tokens;")
|
||||
print(cur.fetchall())
|
||||
|
||||
t = data_class()
|
||||
t.data = {'3': 'foofortokensofcourse'}
|
||||
t.just_created()
|
||||
|
@ -1212,14 +1218,23 @@ def test_search_tokens_purge(pub):
|
|||
cur.execute('SELECT count(*) FROM wcs_search_tokens;')
|
||||
assert cur.fetchone()[0] == start + 2
|
||||
|
||||
cur.execute("SELECT * FROM wcs_search_tokens;")
|
||||
print(cur.fetchall())
|
||||
|
||||
t.data = {'3': 'chaussettefortokensofcourse'}
|
||||
t.store()
|
||||
|
||||
cur.execute('SELECT count(*) FROM wcs_search_tokens;')
|
||||
assert cur.fetchone()[0] == start + 3
|
||||
|
||||
cur.execute("SELECT * FROM wcs_search_tokens;")
|
||||
print(cur.fetchall())
|
||||
|
||||
sql.purge_obsolete_search_tokens()
|
||||
|
||||
cur.execute("SELECT * FROM wcs_search_tokens;")
|
||||
print(cur.fetchall())
|
||||
|
||||
cur.execute('SELECT count(*) FROM wcs_search_tokens;')
|
||||
assert cur.fetchone()[0] == start + 2
|
||||
|
||||
|
|
Loading…
Reference in New Issue