dump data
gitea/wcs/pipeline/head There was a failure building this commit Details

This commit is contained in:
Pierre Ducroquet 2024-04-09 16:38:19 +02:00
parent 614ff32a23
commit 89a165c975
1 changed files with 9 additions and 0 deletions

View File

@ -386,6 +386,10 @@ def test_backoffice_submission_formdef_list(pub, local_user, access, auth):
@pytest.mark.parametrize('auth', ['signature', 'http-basic'])
def test_backoffice_submission_formdef_list_search(pub, local_user, access, auth):
from wcs import sql
# purge garbage from other tests
sql.purge_obsolete_search_tokens()
pub.role_class.wipe()
role = pub.role_class(name='Foo bar')
role.store()
@ -429,6 +433,11 @@ def test_backoffice_submission_formdef_list_search(pub, local_user, access, auth
resp = get_url('/api/formdefs/?backoffice-submission=on&q=test')
assert len(resp.json['data']) == 2
# dump content of tokens, something is wrong
_, cur = sql.get_connection_and_cursor()
cur.execute("SELECT * FROM wcs_search_tokens")
print(cur.fetchall())
resp = get_url('/api/formdefs/?backoffice-submission=on&q=tes')
assert len(resp.json['data']) == 2