fix test following better purge of forms
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
9d8efbda51
commit
180f07752e
|
@ -1218,25 +1218,28 @@ def test_search_tokens_purge(pub):
|
|||
cur.execute("SELECT * FROM wcs_search_tokens;")
|
||||
print(cur.fetchall())
|
||||
|
||||
# 3 elements are indexed here, ids and field
|
||||
cur.execute('SELECT count(*) FROM wcs_search_tokens;')
|
||||
assert cur.fetchone()[0] == start + 2
|
||||
assert cur.fetchone()[0] == start + 4
|
||||
|
||||
t.data = {'3': 'chaussettefortokensofcourse'}
|
||||
t.store()
|
||||
|
||||
# one additional element
|
||||
cur.execute("SELECT * FROM wcs_search_tokens;")
|
||||
print(cur.fetchall())
|
||||
|
||||
cur.execute('SELECT count(*) FROM wcs_search_tokens;')
|
||||
assert cur.fetchone()[0] == start + 3
|
||||
assert cur.fetchone()[0] == start + 5
|
||||
|
||||
sql.purge_obsolete_search_tokens()
|
||||
|
||||
cur.execute("SELECT * FROM wcs_search_tokens;")
|
||||
print(cur.fetchall())
|
||||
|
||||
# should be back to the previous step
|
||||
cur.execute('SELECT count(*) FROM wcs_search_tokens;')
|
||||
assert cur.fetchone()[0] == start + 2
|
||||
assert cur.fetchone()[0] == start + 4
|
||||
|
||||
|
||||
def table_exists(cur, table_name):
|
||||
|
|
Loading…
Reference in New Issue