@@ -77,6 +77,14 @@ async def on_installation_update(self, turn_context: TurnContext):
7777 self .record .append ("on_installation_update" )
7878 return await super ().on_installation_update (turn_context )
7979
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+
8088 async def on_unrecognized_activity_type (self , turn_context : TurnContext ):
8189 self .record .append ("on_unrecognized_activity_type" )
8290 return await super ().on_unrecognized_activity_type (turn_context )
@@ -246,6 +254,34 @@ async def test_on_installation_update(self):
246254 assert len (bot .record ) == 1
247255 assert bot .record [0 ] == "on_installation_update"
248256
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+
249285 async def test_healthcheck (self ):
250286 activity = Activity (type = ActivityTypes .invoke , name = "healthcheck" ,)
251287
0 commit comments