forked from Uninett/nav
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import sudo function from correct module
- Loading branch information
1 parent
e0c73c7
commit f0e6614
Showing
2 changed files
with
16 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
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from django.urls import reverse | ||
|
||
|
||
def test_operate_as_this_user_should_not_crash(db, client, admin_account): | ||
url = reverse('useradmin-account_detail', args=(admin_account.pk,)) | ||
response = client.post( | ||
url, | ||
follow=True, | ||
data={ | ||
"account": admin_account.pk, | ||
"submit_sudo": "Operate+as+this+user", | ||
}, | ||
) | ||
|
||
assert response.status_code == 200 |