@@ -77,6 +77,14 @@ async def on_installation_update(self, turn_context: TurnContext):
77
77
self .record .append ("on_installation_update" )
78
78
return await super ().on_installation_update (turn_context )
79
79
80
+ async def on_installation_update_add (self , turn_context : TurnContext ):
81
+ self .record .append ("on_installation_update_add" )
82
+ return await super ().on_installation_update_add (turn_context )
83
+
84
+ async def on_installation_update_remove (self , turn_context : TurnContext ):
85
+ self .record .append ("on_installation_update_remove" )
86
+ return await super ().on_installation_update_remove (turn_context )
87
+
80
88
async def on_unrecognized_activity_type (self , turn_context : TurnContext ):
81
89
self .record .append ("on_unrecognized_activity_type" )
82
90
return await super ().on_unrecognized_activity_type (turn_context )
@@ -246,6 +254,34 @@ async def test_on_installation_update(self):
246
254
assert len (bot .record ) == 1
247
255
assert bot .record [0 ] == "on_installation_update"
248
256
257
+ async def test_on_installation_update_add (self ):
258
+ activity = Activity (type = ActivityTypes .installation_update , action = "add" )
259
+
260
+ adapter = TestInvokeAdapter ()
261
+ turn_context = TurnContext (adapter , activity )
262
+
263
+ # Act
264
+ bot = TestingActivityHandler ()
265
+ await bot .on_turn (turn_context )
266
+
267
+ assert len (bot .record ) == 2
268
+ assert bot .record [0 ] == "on_installation_update"
269
+ assert bot .record [1 ] == "on_installation_update_add"
270
+
271
+ async def test_on_installation_update_add_remove (self ):
272
+ activity = Activity (type = ActivityTypes .installation_update , action = "remove" )
273
+
274
+ adapter = TestInvokeAdapter ()
275
+ turn_context = TurnContext (adapter , activity )
276
+
277
+ # Act
278
+ bot = TestingActivityHandler ()
279
+ await bot .on_turn (turn_context )
280
+
281
+ assert len (bot .record ) == 2
282
+ assert bot .record [0 ] == "on_installation_update"
283
+ assert bot .record [1 ] == "on_installation_update_remove"
284
+
249
285
async def test_healthcheck (self ):
250
286
activity = Activity (type = ActivityTypes .invoke , name = "healthcheck" ,)
251
287
0 commit comments