1111 "requested_version" : "0.12.1" ,
1212 "conda_available" : True ,
1313 "test_data_available" : True ,
14- "requester_name" : "Dr. Smith" ,
15- "requester_email" : "smith@example.com" ,
1614 "requester_affiliation" : "Example University" ,
1715}
1816
@@ -63,9 +61,16 @@ def test_admin_receives_notification_after_submission(self):
6361 len (tool_request_notifications ) >= 1
6462 ), f"Expected at least one tool_request notification for admin, got: { notifications } "
6563
66- notification = tool_request_notifications [0 ]
64+ sender_notifications = [
65+ n for n in tool_request_notifications if n ["content" ].get ("requester_email" ) == user ["email" ]
66+ ]
67+ assert (
68+ len (sender_notifications ) >= 1
69+ ), f"Expected notification from { user ['email' ]} , got: { tool_request_notifications } "
70+ notification = sender_notifications [0 ]
6771 assert notification ["content" ]["tool_name" ] == TOOL_REQUEST_PAYLOAD ["tool_name" ]
68- assert notification ["content" ]["requester_name" ] == TOOL_REQUEST_PAYLOAD ["requester_name" ]
72+ assert notification ["content" ]["requester_name" ] == user ["username" ]
73+ assert notification ["content" ]["requester_email" ] == user ["email" ]
6974 assert notification ["content" ]["description" ] == TOOL_REQUEST_PAYLOAD ["description" ]
7075
7176 def test_missing_required_fields_returns_400 (self ):
@@ -74,19 +79,18 @@ def test_missing_required_fields_returns_400(self):
7479 with self ._different_user (user ["email" ]):
7580 # Missing tool_name and description (both required)
7681 incomplete_payload = {
77- "requester_name " : "Dr. Smith " ,
82+ "requester_affiliation " : "Example University " ,
7883 }
7984 response = self ._post ("tool_request_form" , data = incomplete_payload , json = True )
8085 self ._assert_status_code_is (response , 400 )
8186
8287 def test_minimal_payload_succeeds (self ):
83- """Only required fields should be enough to submit."""
88+ """Only required fields (tool_name, description) should be enough to submit."""
8489 user = self ._setup_user ("tool_request_minimal@galaxy.test" )
8590 with self ._different_user (user ["email" ]):
8691 minimal_payload = {
8792 "tool_name" : "Samtools" ,
8893 "description" : "Tools for manipulating alignments in SAM format." ,
89- "requester_name" : "Dr. Jones" ,
9094 }
9195 response = self ._post ("tool_request_form" , data = minimal_payload , json = True )
9296 self ._assert_status_code_is (response , 204 )
@@ -101,7 +105,6 @@ def test_workflow_install_request_with_tool_ids(self):
101105 "but not installed: toolshed.g2.bx.psu.edu/repos/devteam/bwa/bwa/0.7.17, "
102106 "toolshed.g2.bx.psu.edu/repos/devteam/samtools/samtools/1.13."
103107 ),
104- "requester_name" : "Dr. Smith" ,
105108 "tool_ids" : [
106109 "toolshed.g2.bx.psu.edu/repos/devteam/bwa/bwa/0.7.17" ,
107110 "toolshed.g2.bx.psu.edu/repos/devteam/samtools/samtools/1.13" ,
0 commit comments