@@ -122,7 +122,12 @@ def test_sends_reassignment_notification_user(self, mock_post):
122
122
data = {"assignedTo" : user1 .username , "assignedBy" : user1 .username },
123
123
)
124
124
assert response .status_code == 200 , response .content
125
- data = {"assignee" : str (user1 .id ), "assigneeEmail" : user1 .email , "assigneeType" : "user" }
125
+ data = {
126
+ "assignee" : str (user1 .id ),
127
+ "assigneeEmail" : user1 .email ,
128
+ "assigneeName" : user1 .name ,
129
+ "assigneeType" : "user" ,
130
+ }
126
131
assert Activity .objects .filter (
127
132
group_id = self .group .id , type = ActivityType .ASSIGNED .value , user_id = user1 .id , data = data
128
133
).exists ()
@@ -143,7 +148,12 @@ def test_sends_reassignment_notification_user(self, mock_post):
143
148
data = {"assignedTo" : user2 .username , "assignedBy" : user1 .username },
144
149
)
145
150
assert response .status_code == 200 , response .content
146
- data = {"assignee" : str (user2 .id ), "assigneeEmail" : user2 .email , "assigneeType" : "user" }
151
+ data = {
152
+ "assignee" : str (user2 .id ),
153
+ "assigneeEmail" : user2 .email ,
154
+ "assigneeName" : user2 .name ,
155
+ "assigneeType" : "user" ,
156
+ }
147
157
assert Activity .objects .filter (
148
158
group_id = self .group .id , type = ActivityType .ASSIGNED .value , user_id = user1 .id , data = data
149
159
).exists ()
@@ -190,7 +200,12 @@ def test_sends_reassignment_notification_team(self, mock_post):
190
200
data = {"assignedTo" : f"team:{ team1 .id } " , "assignedBy" : self .user .username },
191
201
)
192
202
assert response .status_code == 200 , response .content
193
- data = {"assignee" : str (team1 .id ), "assigneeEmail" : None , "assigneeType" : "team" }
203
+ data = {
204
+ "assignee" : str (team1 .id ),
205
+ "assigneeEmail" : None ,
206
+ "assigneeName" : team1 .name ,
207
+ "assigneeType" : "team" ,
208
+ }
194
209
assert Activity .objects .filter (
195
210
group_id = group .id , user_id = user1 .id , type = ActivityType .ASSIGNED .value , data = data
196
211
).exists ()
@@ -213,7 +228,12 @@ def test_sends_reassignment_notification_team(self, mock_post):
213
228
data = {"assignedTo" : f"team:{ team2 .id } " , "assignedBy" : self .user .username },
214
229
)
215
230
assert response .status_code == 200 , response .content
216
- data = {"assignee" : str (team2 .id ), "assigneeEmail" : None , "assigneeType" : "team" }
231
+ data = {
232
+ "assignee" : str (team2 .id ),
233
+ "assigneeEmail" : None ,
234
+ "assigneeName" : team2 .name ,
235
+ "assigneeType" : "team" ,
236
+ }
217
237
assert Activity .objects .filter (
218
238
group_id = group .id , user_id = user1 .id , type = ActivityType .ASSIGNED .value , data = data
219
239
).exists ()
0 commit comments