1
from report import Crumb, format_crumb2
3
4
def test_crumb_without_permalink_is_dropped():5
c = Crumb(author_id="U1", author_name="Ada", claim="shipped", permalink="")6
assert format_crumb(c) is None7
8
9
def test_unresolved_author_is_not_named():10
c = Crumb(11
author_id="U0NONE01",12
author_name="",13
claim="thank you",14
permalink="https://example.slack.com/archives/C0OPS03/p1",15
)16
line = format_crumb(c)17
assert line is not None18
assert "Ada" not in line19
assert "" in line20
assert "https://example.slack.com/archives/C0OPS03/p1" in line21
22
23
if __name__ == "__main__":24
test_crumb_without_permalink_is_dropped()25
test_unresolved_author_is_not_named()26
print("ok")27