Skip to content

Commit 89653e7

Browse files
authored
test: update Confluence tests and add dependency version bounds (sooperset#557)
* test: update Confluence tests to use 'pat' auth type Following PR sooperset#549 which changed Confluence PAT authentication type from "token" to "pat", update all test files to use the correct auth type. This ensures tests accurately reflect the production code behavior where Confluence Data Center uses auth_type="pat" for personal access tokens, matching the Jira implementation. Updates: - test_client.py: Change token auth test to use "pat" - test_config.py: Update all Server/DC config tests to use "pat" - test_context.py: Update Confluence config test to use "pat" Github-Issue: sooperset#549 * build: add upper version bounds to prevent dependency conflicts Add explicit upper version bounds to all dependencies in pyproject.toml to prevent future compatibility issues when new major versions are released. This ensures consistent builds and prevents unexpected breaking changes. Key constraints added: - Most packages limited to next major version (e.g., <5.0.0, <2.0.0) - FastMCP kept at <2.4.0 due to breaking changes in 2.9.0 - Cachetools and types-cachetools allow up to <7.0.0 for flexibility Also regenerated uv.lock to reflect these constraints.
1 parent 924268c commit 89653e7

File tree

5 files changed

+751
-561
lines changed

5 files changed

+751
-561
lines changed

pyproject.toml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@ description = "The Model Context Protocol (MCP) Atlassian integration is an open
55
readme = "README.md"
66
requires-python = ">=3.10"
77
dependencies = [
8-
"atlassian-python-api>=4.0.0",
9-
"requests[socks]>=2.31.0",
10-
"beautifulsoup4>=4.12.3",
11-
"httpx>=0.28.0",
8+
"atlassian-python-api>=4.0.0,<5.0.0",
9+
"requests[socks]>=2.31.0,<3.0.0",
10+
"beautifulsoup4>=4.12.3,<5.0.0",
11+
"httpx>=0.28.0,<1.0.0",
1212
"mcp>=1.8.0,<2.0.0",
1313
"fastmcp>=2.3.4,<2.4.0",
14-
"python-dotenv>=1.0.1",
15-
"markdownify>=0.11.6",
16-
"markdown>=3.7.0",
17-
"markdown-to-confluence>=0.3.0",
18-
"pydantic>=2.10.6",
19-
"trio>=0.29.0",
20-
"click>=8.1.7",
21-
"uvicorn>=0.27.1",
22-
"starlette>=0.37.1",
23-
"thefuzz>=0.22.1",
24-
"python-dateutil>=2.9.0.post0",
25-
"types-python-dateutil>=2.9.0.20241206",
26-
"keyring>=25.6.0",
27-
"cachetools>=5.0.0",
28-
"types-cachetools>=5.5.0.20240820",
14+
"python-dotenv>=1.0.1,<2.0.0",
15+
"markdownify>=0.11.6,<2.0.0",
16+
"markdown>=3.7.0,<4.0.0",
17+
"markdown-to-confluence>=0.3.0,<1.0.0",
18+
"pydantic>=2.10.6,<3.0.0",
19+
"trio>=0.29.0,<1.0.0",
20+
"click>=8.1.7,<9.0.0",
21+
"uvicorn>=0.27.1,<1.0.0",
22+
"starlette>=0.37.1,<1.0.0",
23+
"thefuzz>=0.22.1,<1.0.0",
24+
"python-dateutil>=2.9.0.post0,<3.0.0",
25+
"types-python-dateutil>=2.9.0.20241206,<3.0.0",
26+
"keyring>=25.6.0,<26.0.0",
27+
"cachetools>=5.0.0,<7.0.0",
28+
"types-cachetools>=5.5.0.20240820,<7.0.0",
2929
]
3030
[[project.authors]]
3131
name = "sooperset"

tests/unit/confluence/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_init_with_token_auth():
5757
# Arrange
5858
config = ConfluenceConfig(
5959
url="https://confluence.example.com",
60-
auth_type="token",
60+
auth_type="pat",
6161
personal_token="test_personal_token",
6262
ssl_verify=False,
6363
)

tests/unit/confluence/test_config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def test_is_cloud():
8989
# Arrange & Act - Server URL
9090
config = ConfluenceConfig(
9191
url="https://confluence.example.com",
92-
auth_type="token",
92+
auth_type="pat",
9393
personal_token="test",
9494
)
9595

@@ -99,7 +99,7 @@ def test_is_cloud():
9999
# Arrange & Act - Localhost URL (Data Center/Server)
100100
config = ConfluenceConfig(
101101
url="http://localhost:8090",
102-
auth_type="token",
102+
auth_type="pat",
103103
personal_token="test",
104104
)
105105

@@ -109,7 +109,7 @@ def test_is_cloud():
109109
# Arrange & Act - IP localhost URL (Data Center/Server)
110110
config = ConfluenceConfig(
111111
url="http://127.0.0.1:8090",
112-
auth_type="token",
112+
auth_type="pat",
113113
personal_token="test",
114114
)
115115

tests/unit/servers/test_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def test_type_hint_compliance_confluence_config(self):
108108
# Test with valid ConfluenceConfig
109109
confluence_config = ConfluenceConfig(
110110
url="https://confluence.example.com",
111-
auth_type="token",
111+
auth_type="pat",
112112
username="[email protected]",
113113
api_token="test_token",
114114
)

0 commit comments

Comments
 (0)