8000 Remove _activity from add and remove installation update event names · itsmokha/botbuilder-python@6319209 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6319209

Browse files
committed
Remove _activity from add and remove installation update event names
1 parent a0a26d6 commit 6319209

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

libraries/botbuilder-core/botbuilder/core/activity_handler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,12 +379,12 @@ async def on_installation_update( # pylint: disable=unused-argument
379379
:returns: A task that represents the work queued to execute
380380
"""
381381
if turn_context.activity.action == "add":
382-
return await self.on_installation_update_add_activity(turn_context)
382+
return await self.on_installation_update_add(turn_context)
383383
if turn_context.activity.action == "remove":
384-
return await self.on_installation_update_remove_activity(turn_context)
384+
return await self.on_installation_update_remove(turn_context)
385385
return
386386

387-
async def on_installation_update_add_activity( # pylint: disable=unused-argument
387+
async def on_installation_update_add( # pylint: disable=unused-argument
388388
self, turn_context: TurnContext
389389
):
390390
"""
@@ -397,7 +397,7 @@ async def on_installation_update_add_activity( # pylint: disable=unused-argumen
397397
"""
398398
return
399399

400-
async def on_installation_update_remove_activity( # pylint: disable=unused-argument
400+
async def on_installation_update_remove( # pylint: disable=unused-argument
401401
self, turn_context: TurnContext
402402
):
403403
"""

libraries/botbuilder-core/tests/test_activity_handler.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ 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_activity(self, turn_context: TurnContext):
81-
self.record.append("on_installation_update_add_activity")
82-
return await super().on_installation_update_add_activity(turn_context)
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)
8383

84-
async def on_installation_update_remove_activity(self, turn_context: TurnContext):
85-
self.record.append("on_installation_update_remove_activity")
86-
return await super().on_installation_update_remove_activity(turn_context)
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)
8787

8888
async def on_unrecognized_activity_type(self, turn_context: TurnContext):
8989
self.record.append("on_unrecognized_activity_type")
@@ -254,7 +254,7 @@ async def test_on_installation_update(self):
254254
assert len(bot.record) == 1
255255
assert bot.record[0] == "on_installation_update"
256256

257-
async def test_on_installation_update_add_activity(self):
257+
async def test_on_installation_update_add(self):
258258
activity = Activity(type=ActivityTypes.installation_update, action="add")
259259

260260
adapter = TestInvokeAdapter()
@@ -266,9 +266,9 @@ async def test_on_installation_update_add_activity(self):
266266

267267
assert len(bot.record) == 2
268268
assert bot.record[0] == "on_installation_update"
269-
assert bot.record[1] == "on_installation_update_add_activity"
269+
assert bot.record[1] == "on_installation_update_add"
270270

271-
async def test_on_installation_update_add_remove_activity(self):
271+
async def test_on_installation_update_add_remove(self):
272272
activity = Activity(type=ActivityTypes.installation_update, action="remove")
273273

274274
adapter = TestInvokeAdapter()
@@ -280,7 +280,7 @@ async def test_on_installation_update_add_remove_activity(self):
280280

281281
assert len(bot.record) == 2
282282
assert bot.record[0] == "on_installation_update"
283-
assert bot.record[1] == "on_installation_update_remove_activity"
283+
assert bot.record[1] == "on_installation_update_remove"
284284

285285
async def test_healthcheck(self):
286286
activity = Activity(type=ActivityTypes.invoke, name="healthcheck",)

0 commit comments

Comments
 (0)
0