Some checks failed
tamq-ci / test (push) Failing after 6s
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a03397-4d51-7fd1-8ff2-946eb22ea2bc
17 lines
607 B
Python
17 lines
607 B
Python
import pytest
|
|
|
|
from tamq.routing import parse_address_line
|
|
|
|
|
|
@pytest.mark.parametrize("prefix", ["@", "#"])
|
|
def test_direct_address(prefix):
|
|
routed = parse_address_line(f"{prefix}railiance-platform: do something!")
|
|
assert routed.body == "do something!"
|
|
assert routed.target_repo == "railiance-platform"
|
|
|
|
|
|
def test_ordinary_input_is_unchanged():
|
|
assert parse_address_line("hello @repo: not at start") is None
|
|
assert parse_address_line("@repo:") is None
|
|
assert parse_address_line("# from repo: inbound envelope") is None
|
|
assert parse_address_line("##repo: not an address") is None
|