Separate and clarify logic for portfolio and non portfolio data in requests serialize

This commit is contained in:
Rachid Mrad 2025-01-06 17:11:26 -05:00
parent 1e12459c10
commit 9fc5fff6e3
No known key found for this signature in database
2 changed files with 17 additions and 11 deletions

View file

@ -338,7 +338,7 @@ class GetRequestsJsonTest(TestWithUser, WebTest):
self.assertEqual(expected_domain_request.creator.email, creator[i])
# Check action url, action label and svg icon
# Example domain requests will test each of below three scenarios
if creator[i] != self.user.email:
if creator[i] != self.user.email or not self.user.has_edit_request_portfolio_permission(self.portfolio):
# Test case where action is View
self.assertEqual("View", action_labels[i])
self.assertEqual(