Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
24 lines
746 B
Python
24 lines
746 B
Python
"""Tests for Planner tab URL classification."""
|
|
from __future__ import annotations
|
|
|
|
from onedrive_planner import _is_facility_plan_url, _is_planner_hub_url
|
|
|
|
|
|
def test_facility_plan_url():
|
|
assert _is_facility_plan_url(
|
|
"https://planner.cloud.microsoft/webui/plan/PID_ABC/view/board?tid=x"
|
|
)
|
|
assert not _is_facility_plan_url(
|
|
"https://planner.cloud.microsoft/webui/mytasks/assignedtome/view/grid?tid=x"
|
|
)
|
|
|
|
|
|
def test_planner_hub_url():
|
|
assert _is_planner_hub_url(
|
|
"https://planner.cloud.microsoft/webui/mytasks/assignedtome/view/grid"
|
|
)
|
|
assert not _is_planner_hub_url(
|
|
"https://planner.cloud.microsoft/webui/plan/PID_ABC/view/board"
|
|
)
|
|
assert not _is_planner_hub_url("about:blank")
|