Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libraries/botbuilder-applicationinsights/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
TESTS_REQUIRES = [
"aiounittest==1.3.0",
"django==3.2.21", # For samples
"djangorestframework==3.10.3", # For samples
"djangorestframework==3.14.0", # For samples
"flask==2.2.5", # For samples
]

Expand Down
9 changes: 7 additions & 2 deletions libraries/botbuilder-core/botbuilder/core/teams/teams_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
teams_get_meeting_info,
teams_get_channel_data,
)
from botbuilder.core import CloudAdapterBase, BotFrameworkAdapter, TurnContext, BotAdapter
from botbuilder.core import (
CloudAdapterBase,
BotFrameworkAdapter,
TurnContext,
BotAdapter,
)
from botbuilder.schema import Activity, ConversationParameters, ConversationReference
from botbuilder.schema.teams import (
ChannelInfo,
Expand Down Expand Up @@ -323,7 +328,7 @@ async def _get_connector_client(turn_context: TurnContext) -> ConnectorClient:
)

if connector_client is None:
raise ValueError('This method requires a connector client.')
raise ValueError("This method requires a connector client.")

return connector_client

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,12 @@ async def test_on_teams_members_added_activity(self):

turn_context = TurnContext(SimpleAdapter(), activity)

mock_connector_client = await SimpleAdapter.create_connector_client(self, turn_context.activity.service_url)
turn_context.turn_state[BotAdapter.BOT_CONNECTOR_CLIENT_KEY] = mock_connector_client
mock_connector_client = await SimpleAdapter.create_connector_client(
self, turn_context.activity.service_url
)
turn_context.turn_state[
BotAdapter.BOT_CONNECTOR_CLIENT_KEY
] = mock_connector_client

# Act
bot = TestingTeamsActivityHandler()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ def retrieve_aiohttp_body():
@middleware
async def bot_telemetry_middleware(request, handler):
"""Process the incoming Flask request."""
if "Content-Type" in request.headers and request.headers["Content-Type"] == "application/json":
if (
"Content-Type" in request.headers
and request.headers["Content-Type"] == "application/json"
):
body = await request.json()
_REQUEST_BODIES[current_thread().ident] = body

Expand Down