Skip to content

Commit 59b71f6

Browse files
committed
Resolving PR comments: Remove fallback imports, fix copyright headers, remove .NET env vars, rename test directories, remove .coverage file
1 parent b767945 commit 59b71f6

19 files changed

Lines changed: 34 additions & 123 deletions

File tree

.coverage

-68 KB
Binary file not shown.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ build/
7373
.eggs/
7474
.pytest_cache/
7575
_version.py
76+
.coverage
77+
.coverage.*
78+
htmlcov/
7679

7780
# Virtual environments
7881
.venv/

libraries/microsoft-agents-a365-tooling/microsoft_agents_a365/tooling/utils/utility.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def _get_current_environment() -> str:
8080
Returns:
8181
str: The current environment name.
8282
"""
83-
return os.getenv("ASPNETCORE_ENVIRONMENT") or os.getenv("DOTNET_ENVIRONMENT") or "Development"
83+
return os.getenv("ENVIRONMENT") or "Development"
8484

8585

8686
def _get_mcp_platform_base_url() -> str:

tests/microsoft-agents-a365-notification/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Copyright (c) Microsoft Corporation.
2-
# Licensed under the MIT License.
1+
# Copyright (c) Microsoft. All rights reserved.
32

43
"""
54
Unit tests for Microsoft Agents A365 Notifications module.

tests/microsoft-agents-a365-notification/models/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Copyright (c) Microsoft Corporation.
2-
# Licensed under the MIT License.
1+
# Copyright (c) Microsoft. All rights reserved.
32

43
"""
54
Unit tests for Microsoft Agents A365 Notifications models.

tests/microsoft-agents-a365-notification/models/test_agent_notification.py

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Copyright (c) Microsoft Corporation.
2-
# Licensed under the MIT License.
1+
# Copyright (c) Microsoft. All rights reserved.
32

43
"""
54
Unit tests for AgentNotification class
@@ -8,34 +7,9 @@
87
from unittest.mock import AsyncMock, Mock
98

109
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
3913

4014
from microsoft_agents_a365.notifications.agent_notification import AgentNotification
4115
from microsoft_agents_a365.notifications.models.agent_notification_activity import (

tests/microsoft-agents-a365-notification/models/test_agent_notification_activity.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Copyright (c) Microsoft Corporation.
2-
# Licensed under the MIT License.
1+
# Copyright (c) Microsoft. All rights reserved.
32

43
"""
54
Unit tests for AgentNotificationActivity class - Clean Version

tests/microsoft-agents-a365-notification/models/test_email_reference.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Copyright (c) Microsoft Corporation.
2-
# Licensed under the MIT License.
1+
# Copyright (c) Microsoft. All rights reserved.
32

43
"""
54
Unit tests for EmailReference class

tests/microsoft-agents-a365-notification/models/test_notification_types.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Copyright (c) Microsoft Corporation.
2-
# Licensed under the MIT License.
1+
# Copyright (c) Microsoft. All rights reserved.
32

43
"""
54
Unit tests for NotificationTypes enum

tests/azureaifoundry_tests/test_azureaifoundry_service_logic.py renamed to tests/microsoft-agents-a365-tooling-extensions-azureaifoundry-unittest/test_azureaifoundry_service_logic.py

File renamed without changes.

0 commit comments

Comments
 (0)