Skip to content
Permalink
Browse files

Add tests for 'strip_html_tags' function

  • Loading branch information...
crwood committed May 22, 2019
1 parent a849ffe commit 298e791eada0909664f4100ca4d697c7c893fab9
Showing with 10 additions and 1 deletion.
  1. +10 −1 tests/test_util.py
@@ -4,7 +4,8 @@

import pytest

from gridsync.util import b58encode, b58decode, humanized_list
from gridsync.util import (
b58encode, b58decode, humanized_list, strip_html_tags)


# From https://github.com/bitcoin/bitcoin/blob/master/src/test/data/base58_encode_decode.json
@@ -48,3 +49,11 @@ def test_b58decode_value_error():
])
def test_humanized_list(items, kind, humanized):
assert humanized_list(items, kind) == humanized


@pytest.mark.parametrize("s,expected", [
['1<p>2<br>3', '123'],
['<a href="https://example.org">link</a>', 'link']
])
def test_strip_html_tags(s, expected):
assert strip_html_tags(s) == expected

0 comments on commit 298e791

Please sign in to comment.
You can’t perform that action at this time.