mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 10:23:14 +00:00
Applies the plan's C5 step: git mv every test per the domain-reorg
move-map (movemap-m50.txt) into tests/{agent,analyzer,auth,dashboard,
github,middleware,models,reviewer,sandbox,slack,tools,webhooks}/, plus
the 13 fork-only placements from the scoping report §2c (Atlassian
webhook tests -> tests/webhooks/, test_atlassian_connect.py and
test_auth_error_leak.py -> tests/auth/, jira/confluence util tests ->
tests/tools/, test_repo_binding_isolation.py -> tests/sandbox/,
bot-identity/autofix tests -> tests/github/).
Path-only move: the only content edits are parents[1] -> parents[2]
fixes in test_e2b_integration.py and test_daytona_integration.py,
required because their __file__-relative ROOT path gained one more
directory level in the move.
Monkeypatch retargets for these files were already completed in C4;
none remained outstanding here.
24 lines
1 KiB
Python
24 lines
1 KiB
Python
import importlib
|
|
|
|
from agent.utils import dashboard_links
|
|
|
|
|
|
def test_dashboard_review_url_points_to_reviews_page(monkeypatch) -> None:
|
|
monkeypatch.setenv("DASHBOARD_BASE_URL", "https://example.com")
|
|
importlib.reload(dashboard_links)
|
|
url = dashboard_links.dashboard_review_url("owner", "repo", 42)
|
|
assert url == "https://example.com/agents/reviews/owner/repo/42"
|
|
|
|
|
|
def test_dashboard_review_url_escapes_segments(monkeypatch) -> None:
|
|
monkeypatch.setenv("DASHBOARD_BASE_URL", "https://example.com")
|
|
importlib.reload(dashboard_links)
|
|
url = dashboard_links.dashboard_review_url("my org", "my/repo", 7)
|
|
assert url == "https://example.com/agents/reviews/my%20org/my%2Frepo/7"
|
|
|
|
|
|
def test_dashboard_review_url_requires_fields(monkeypatch) -> None:
|
|
monkeypatch.setenv("DASHBOARD_BASE_URL", "https://example.com")
|
|
importlib.reload(dashboard_links)
|
|
assert dashboard_links.dashboard_review_url("", "repo", 1) is None
|
|
assert dashboard_links.dashboard_review_url("owner", "repo", 0) is None
|