@@ -215,7 +215,7 @@ def test_product_types(self, mock):
215215 with self .subTest ("product_type_added" ):
216216 with set_actor (self .notification_tester ), pghistory .context (user = self .notification_tester .id ):
217217 prod_type = Product_Type .objects .create (name = "notif prod type" )
218- self .assertEqual (mock .call_count , last_count + 4 )
218+ self .assertEqual (mock .call_count , last_count + 5 )
219219 self .assertEqual (mock .call_args_list [- 1 ].args [0 ], "product_type_added" )
220220 self .assertEqual (mock .call_args_list [- 1 ].kwargs ["url" ], f"/product/type/{ prod_type .id } " )
221221
@@ -236,7 +236,7 @@ def test_products(self, mock):
236236 with set_actor (self .notification_tester ), pghistory .context (user = self .notification_tester .id ):
237237 prod_type = Product_Type .objects .first ()
238238 prod , _ = Product .objects .get_or_create (prod_type = prod_type , name = "prod name" )
239- self .assertEqual (mock .call_count , last_count + 5 )
239+ self .assertEqual (mock .call_count , last_count + 6 )
240240 self .assertEqual (mock .call_args_list [- 1 ].args [0 ], "product_added" )
241241 self .assertEqual (mock .call_args_list [- 1 ].kwargs ["url" ], f"/product/{ prod .id } " )
242242
@@ -257,7 +257,7 @@ def test_engagements(self, mock):
257257 with set_actor (self .notification_tester ), pghistory .context (user = self .notification_tester .id ):
258258 prod = Product .objects .first ()
259259 eng = Engagement .objects .create (product = prod , target_start = timezone .now (), target_end = timezone .now ())
260- self .assertEqual (mock .call_count , last_count + 5 )
260+ self .assertEqual (mock .call_count , last_count + 6 )
261261 self .assertEqual (mock .call_args_list [- 1 ].args [0 ], "engagement_added" )
262262 self .assertEqual (mock .call_args_list [- 1 ].kwargs ["url" ], f"/engagement/{ eng .id } " )
263263
@@ -266,7 +266,7 @@ def test_engagements(self, mock):
266266 with set_actor (self .notification_tester ), pghistory .context (user = self .notification_tester .id ):
267267 eng .status = "Completed"
268268 eng .save ()
269- self .assertEqual (mock .call_count , last_count + 5 )
269+ self .assertEqual (mock .call_count , last_count + 6 )
270270 self .assertEqual (mock .call_args_list [- 1 ].args [0 ], "engagement_closed" )
271271 self .assertEqual (mock .call_args_list [- 1 ].kwargs ["url" ], f"/engagement/{ eng .id } /finding/all" )
272272
@@ -275,7 +275,7 @@ def test_engagements(self, mock):
275275 with set_actor (self .notification_tester ), pghistory .context (user = self .notification_tester .id ):
276276 eng .status = "In Progress"
277277 eng .save ()
278- self .assertEqual (mock .call_count , last_count + 5 )
278+ self .assertEqual (mock .call_count , last_count + 6 )
279279 self .assertEqual (mock .call_args_list [- 1 ].args [0 ], "engagement_reopened" )
280280 self .assertEqual (mock .call_args_list [- 1 ].kwargs ["url" ], f"/engagement/{ eng .id } " )
281281
@@ -376,7 +376,7 @@ def test_finding_groups(self, mock):
376376 with self .subTest ("test_deleted itself" ):
377377 with set_actor (self .notification_tester ), pghistory .context (user = self .notification_tester .id ):
378378 fg2 .delete ()
379- self .assertEqual (mock .call_count , last_count + 5 )
379+ self .assertEqual (mock .call_count , last_count + 6 )
380380 self .assertEqual (mock .call_args_list [- 1 ].args [0 ], "finding_group_deleted" )
381381 self .assertEqual (mock .call_args_list [- 1 ].kwargs ["description" ], 'The finding group "fg test" was deleted by admin' )
382382 self .assertEqual (mock .call_args_list [- 1 ].kwargs ["url" ], f"/test/{ test2 .id } " )
0 commit comments