test(account): count the page's own forms, not base.html's
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -174,7 +174,7 @@ def test_an_account_sets_its_own_address_and_switches_and_an_admin_can_too(app):
|
||||
async def _go():
|
||||
viewer, vid = await _client(app, role="viewer")
|
||||
page = await (await viewer.get("/account/")).get_data(as_text=True)
|
||||
assert page.count("<form") == 1 and 'name="notify_alerts"' in page and "As for viewers (on)" in page
|
||||
assert page.count('action="/account/') == 1 and 'name="notify_alerts"' in page and "As for viewers (on)" in page
|
||||
|
||||
mine = {"time_zone": "Europe/Paris", "notify_alerts": "off", "notify_report": ""}
|
||||
resp = await viewer.post("/account/", headers=CSRF, form=mine | {"email": "nope@oidc"})
|
||||
|
||||
Reference in New Issue
Block a user