tests: use more precise checks for lingo cells

This commit is contained in:
Frédéric Péters 2018-01-18 08:48:11 +01:00
parent c8305b3251
commit 9d1f38e645
1 changed files with 4 additions and 4 deletions

View File

@ -162,9 +162,9 @@ def test_configure_invoices_cell(app, admin_user):
app = login(app)
resp = app.get('/manage/pages/%s/' % page.id, status=200)
# 2 occurences of tipi payment form should be present
# 2 occurences of tipi payment form should be present, and no other cells
assert resp.content.count('lingo') == 2
assert 'lingo_tipipaymentformcell' in resp.content
assert resp.content.count('lingo_tipipaymentformcell') == 2
regie = Regie()
regie.label = 'Test'
@ -173,8 +173,8 @@ def test_configure_invoices_cell(app, admin_user):
regie.save()
resp = app.get('/manage/pages/%s/' % page.id, status=200)
assert 'lingo' in resp.content
assert not 'lingo_activeitems' in resp.content
assert 'lingorecenttransactionscell' in resp.content # because there's a regie
assert not 'lingo_activeitems' in resp.content # because there's no webservice
regie.webservice_url = 'http://example.net/'
regie.save()