-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: additional assertions on invitation tests
- Loading branch information
Showing
1 changed file
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,11 @@ def test_invitation(testclient, logged_admin, foo_group, smtpd): | |
testclient.get("/logout") | ||
res = testclient.get(url, status=200) | ||
|
||
assert res.form["user_name"].value == "someone" | ||
assert "readonly" in res.form["user_name"].attrs | ||
assert "readonly" in res.form["emails-0"].attrs | ||
assert "readonly" in res.form["groups"].attrs | ||
|
||
assert res.form["user_name"].value == "someone" | ||
assert res.form["emails-0"].value == "[email protected]" | ||
assert res.form["groups"].value == [foo_group.id] | ||
|
||
|
@@ -77,8 +80,11 @@ def test_invitation_editable_user_name(testclient, logged_admin, foo_group, smtp | |
|
||
res = testclient.get(url, status=200) | ||
|
||
assert res.form["user_name"].value == "jackyjack" | ||
assert "readonly" not in res.form["user_name"].attrs | ||
assert "readonly" in res.form["emails-0"].attrs | ||
assert "readonly" in res.form["groups"].attrs | ||
|
||
assert res.form["user_name"].value == "jackyjack" | ||
assert res.form["emails-0"].value == "[email protected]" | ||
assert res.form["groups"].value == [foo_group.id] | ||
|
||
|
@@ -124,6 +130,10 @@ def test_generate_link(testclient, logged_admin, foo_group, smtpd): | |
|
||
res = testclient.get(url, status=200) | ||
|
||
assert "readonly" in res.form["user_name"].attrs | ||
assert "readonly" in res.form["emails-0"].attrs | ||
assert "readonly" in res.form["groups"].attrs | ||
|
||
assert res.form["user_name"].value == "sometwo" | ||
assert res.form["emails-0"].value == "[email protected]" | ||
assert res.form["groups"].value == [foo_group.id] | ||
|