-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix ProjectInviteCreateView redirect in category (#1510)
- Loading branch information
Showing
4 changed files
with
30 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
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 |
---|---|---|
|
@@ -4118,8 +4118,8 @@ def test_get(self): | |
form.fields['role'].choices, | ||
) | ||
|
||
def test_get_from_roleassignment(self): | ||
"""Test GET with forwarded values from RoleAssignment Form""" | ||
def test_get_query_string(self): | ||
"""Test GET with query string from RoleAssignment form""" | ||
data = { | ||
'e': '[email protected]', | ||
'r': self.role_contributor.pk, | ||
|
@@ -4140,6 +4140,26 @@ def test_get_from_roleassignment(self): | |
) | ||
self.assertEqual(form.fields['email'].initial, '[email protected]') | ||
|
||
def test_get_query_string_category(self): | ||
"""Test GET with query string in category""" | ||
category = self.make_project( | ||
'TestCategory', PROJECT_TYPE_CATEGORY, None | ||
) | ||
self.make_assignment(category, self.user, self.role_owner) | ||
data = { | ||
'e': '[email protected]', | ||
'r': self.role_contributor.pk, | ||
} | ||
with self.login(self.user): | ||
response = self.client.get( | ||
reverse( | ||
'projectroles:invite_create', | ||
kwargs={'project': category.sodar_uuid}, | ||
), | ||
data, | ||
) | ||
self.assertEqual(response.status_code, 200) | ||
|
||
def test_get_not_found(self): | ||
"""Test GET with invalid project UUID""" | ||
with self.login(self.user): | ||
|
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