|
1 | | -# Copyright (c) Microsoft Corporation. |
2 | | -# Licensed under the MIT License. |
| 1 | +# Copyright (c) Microsoft. All rights reserved. |
3 | 2 |
|
4 | 3 | """ |
5 | 4 | Unit tests for AgentNotification class |
|
8 | 7 | from unittest.mock import AsyncMock, Mock |
9 | 8 |
|
10 | 9 | import pytest |
11 | | - |
12 | | -# Mock external dependencies for testing |
13 | | -try: |
14 | | - from microsoft_agents.activity import Activity, ChannelId |
15 | | - from microsoft_agents.hosting.core import TurnContext |
16 | | - from microsoft_agents.hosting.core.app.state import TurnState |
17 | | -except ImportError: |
18 | | - # Create mocks if microsoft_agents v0.50+ is not available |
19 | | - class ChannelId: |
20 | | - MSTeams = "msteams" |
21 | | - Directline = "directline" |
22 | | - Webchat = "webchat" |
23 | | - |
24 | | - class Activity: |
25 | | - def __init__(self, **kwargs): |
26 | | - for k, v in kwargs.items(): |
27 | | - setattr(self, k, v) |
28 | | - |
29 | | - class TurnContext: |
30 | | - def __init__(self, **kwargs): |
31 | | - for k, v in kwargs.items(): |
32 | | - setattr(self, k, v) |
33 | | - |
34 | | - class TurnState: |
35 | | - def __init__(self, **kwargs): |
36 | | - for k, v in kwargs.items(): |
37 | | - setattr(self, k, v) |
38 | | - |
| 10 | +from microsoft_agents.activity import Activity, ChannelId |
| 11 | +from microsoft_agents.hosting.core import TurnContext |
| 12 | +from microsoft_agents.hosting.core.app.state import TurnState |
39 | 13 |
|
40 | 14 | from microsoft_agents_a365.notifications.agent_notification import AgentNotification |
41 | 15 | from microsoft_agents_a365.notifications.models.agent_notification_activity import ( |
|
0 commit comments