Example #1
0
def test_bleach_if_enabled():
    assert tinyblog_bleach(
        '<div class="western">bar</div>'
    ) == 'bar'
Example #2
0
def test_paragraphs_allowed():
    assert tinyblog_bleach(
        '<p class="western">foo</p>'
    ) == '<p>foo</p>'
Example #3
0
def test_no_bleach_if_disabled():
    assert tinyblog_bleach(
        '<div class="western">bar</div>'
    ) == '<div class="western">bar</div>'
Example #4
0
 def bleached_teaser(self):
     return tinyblog_bleach(self.teaser_html)
Example #5
0
def test_links_work():
    assert tinyblog_bleach(
        '<a class="cat" href="bar">foo</a>'
    ) == '<a href="bar">foo</a>'
Example #6
0
def test_overriding_allowed_attributes():
    assert tinyblog_bleach(
        '<p class="western">bar</p>'
    ) == '<p class="western">bar</p>'
Example #7
0
def test_paragraphs_allowed():
    assert tinyblog_bleach('<p class="western">foo</p>') == '<p>foo</p>'
Example #8
0
def test_no_classes():
    assert tinyblog_bleach(
        '<strong class="western">foo</strong>') == '<strong>foo</strong>'
Example #9
0
 def bleached_full_text(self):
     return tinyblog_bleach(self.full_text())
Example #10
0
def test_notags():
    assert tinyblog_bleach('foobar') == 'foobar'
Example #11
0
def test_overriding_allowed_attributes():
    assert tinyblog_bleach(
        '<p class="western">bar</p>') == '<p class="western">bar</p>'
Example #12
0
def test_overriding_allowed_tags():
    assert tinyblog_bleach(
        '<div class="western">bar</div>') == '<div>bar</div>'
Example #13
0
def test_bleach_if_enabled():
    assert tinyblog_bleach('<div class="western">bar</div>') == 'bar'
Example #14
0
def test_no_bleach_if_disabled():
    assert tinyblog_bleach(
        '<div class="western">bar</div>') == '<div class="western">bar</div>'
Example #15
0
def test_notags():
    assert tinyblog_bleach('foobar') == 'foobar'
Example #16
0
 def bleached_teaser(self):
     return tinyblog_bleach(self.teaser_html)
Example #17
0
def test_overriding_allowed_tags():
    assert tinyblog_bleach(
        '<div class="western">bar</div>'
    ) == '<div>bar</div>'
Example #18
0
 def bleached_text(self):
     return tinyblog_bleach(self.text_html)
Example #19
0
def test_no_classes():
    assert tinyblog_bleach(
        '<strong class="western">foo</strong>'
    ) == '<strong>foo</strong>'
Example #20
0
def test_links_work():
    assert tinyblog_bleach(
        '<a class="cat" href="bar">foo</a>') == '<a href="bar">foo</a>'