From b4751b1bd24f7f4b1618c20d99eef401daad343e Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Wed, 10 Apr 2019 23:43:41 +0200 Subject: [PATCH] Fix tests --- little_boxes/content_helper.py | 4 +++- tests/test_content_helper.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/little_boxes/content_helper.py b/little_boxes/content_helper.py index 3e8bd3a..ac3abc6 100644 --- a/little_boxes/content_helper.py +++ b/little_boxes/content_helper.py @@ -37,7 +37,9 @@ def hashtagify(content: str) -> Tuple[str, List[Dict[str, str]]]: return content, tags -def mentionify(content: str, hide_domain: bool = False) -> Tuple[str, List[Dict[str, str]]]: +def mentionify( + content: str, hide_domain: bool = False +) -> Tuple[str, List[Dict[str, str]]]: tags = [] for mention in re.findall(MENTION_REGEX, content): _, username, domain = mention.split("@") diff --git a/tests/test_content_helper.py b/tests/test_content_helper.py index 71f8519..7e77e12 100644 --- a/tests/test_content_helper.py +++ b/tests/test_content_helper.py @@ -41,8 +41,8 @@ def test_little_content_helper_mention(_): content, tags = content_helper.parse_markdown("hello @dev@microblog.pub") assert content == ( - '

hello @dev' - "

" + '

hello @dev' + "@microblog.pub

" ) assert tags == [ {