-
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.
- Loading branch information
Showing
13 changed files
with
647 additions
and
414 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
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -120,13 +120,14 @@ def test_cataloging_admin_can_edit_permission_from_user_view(user, permission, s | |
assert res.status_code == 302 | ||
assert url_for('permission.edit', permission_id=permission.id) in res.location | ||
other_user = User.get_by_email('[email protected]') | ||
# Fills out the form to grant 'other_user' permissions on 'collection' | ||
res = res.follow() | ||
assert other_user is not None | ||
# Saves the form to grant 'other_user' permissions on 'collection' | ||
res = res.follow(headers={'Referer': res.request.referrer}) # FIXME: Webtest dropping referer. | ||
assert res.status_code == 200 | ||
# Fills out the form, by changing to 'other_user'' | ||
form = res.forms['editPermissionForm'] | ||
# New user is preset, ``form['user_id'] = other_user.id`` is redundant | ||
# Defaults are kept, setting ``form['collection_id'] = permission.collection.id`` is redundant | ||
form['user_id'] = other_user.id | ||
# Submits | ||
res = form.submit() | ||
assert res.status_code == 302 | ||
|
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 |
---|---|---|
|
@@ -75,11 +75,12 @@ def test_cataloging_admin_can_register_permission_from_collection_view(user, col | |
assert res.status_code == 302 | ||
assert url_for('permission.register', collection_id=collection.id) in res.location | ||
other_user = User.get_by_email('[email protected]') | ||
# Fills out the form to grant 'other_user' permissions on 'collection' | ||
res = res.follow() | ||
assert other_user is not None | ||
# Saves the form to grant 'other_user' permissions on 'collection' | ||
res = res.follow(headers={'Referer': res.request.referrer}) # FIXME: Webtest dropping referer. | ||
assert res.status_code == 200 | ||
register_permission_form = res.forms['registerPermissionForm'] | ||
register_permission_form['user_id'] = other_user.id | ||
# New user is preset, ``register_permission_form['user_id'] = other_user.id`` is redundant | ||
# Defaults are kept, ``register_permission_form['collection_id'] = collection.id`` is redundant | ||
register_permission_form['registrant'].checked = True | ||
register_permission_form['cataloger'].checked = True | ||
|
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
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
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
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
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
Oops, something went wrong.