lingo: check num queries on transaction list page (#38115)
This commit is contained in:
parent
ac3b6c3d10
commit
93f8357f4f
|
@ -3,6 +3,8 @@
|
|||
import datetime
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from django.db import connection
|
||||
from django.test.utils import CaptureQueriesContext
|
||||
from django.utils.timezone import now
|
||||
|
||||
import mock
|
||||
|
@ -211,8 +213,10 @@ def test_transactions_search(app, admin_user):
|
|||
amount=1+i).save()
|
||||
|
||||
app = login(app)
|
||||
resp = app.get('/manage/lingo/', status=200)
|
||||
with CaptureQueriesContext(connection) as ctx:
|
||||
resp = app.get('/manage/lingo/', status=200)
|
||||
assert resp.text.count('<tr') == 11
|
||||
assert len(ctx.captured_queries) == 74
|
||||
|
||||
resp.form['q'] = 'order id 16'
|
||||
resp = resp.form.submit()
|
||||
|
|
Loading…
Reference in New Issue