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