コード例 #1
0
 def test_other_rel(self):
     attrs = {
         (None, "href"): "http://example.com",
         (None, "rel"): "next",
     }
     assert nofollow(attrs) == {
         (None, "href"): "http://example.com",
         (None, "rel"): "next nofollow",
     }
コード例 #2
0
 def test_other_rel(self):
     attrs = {
         (None, 'href'): 'http://example.com',
         (None, 'rel'): 'next',
     }
     assert (nofollow(attrs) == {
         (None, 'href'): 'http://example.com',
         (None, 'rel'): 'next nofollow'
     })
コード例 #3
0
ファイル: test_callbacks.py プロジェクト: aysonje/bleach
 def test_other_rel(self):
     attrs = {
         (None, 'href'): 'http://example.com',
         (None, 'rel'): 'next',
     }
     assert (
         nofollow(attrs) ==
         {(None, 'href'): 'http://example.com', (None, 'rel'): 'next nofollow'}
     )
コード例 #4
0
 def test_has_nofollow_already(self):
     attrs = {
         (None, 'href'): 'http://example.com',
         (None, 'rel'): 'nofollow',
     }
     assert nofollow(attrs) == attrs
コード例 #5
0
 def test_mailto(self):
     attrs = {(None, 'href'): 'mailto:[email protected]'}
     assert nofollow(attrs) == attrs
コード例 #6
0
 def test_basic(self):
     attrs = {(None, 'href'): 'http://example.com'}
     assert (nofollow(attrs) == {
         (None, 'href'): 'http://example.com',
         (None, 'rel'): 'nofollow'
     })
コード例 #7
0
ファイル: test_callbacks.py プロジェクト: aysonje/bleach
 def test_no_href(self):
     attrs = {'_text': 'something something'}
     assert nofollow(attrs) == attrs
コード例 #8
0
ファイル: test_callbacks.py プロジェクト: aysonje/bleach
 def test_blank(self):
     attrs = {}
     assert nofollow(attrs) == attrs
コード例 #9
0
 def test_basic(self):
     attrs = {(None, "href"): "http://example.com"}
     assert nofollow(attrs) == {
         (None, "href"): "http://example.com",
         (None, "rel"): "nofollow",
     }
コード例 #10
0
ファイル: test_callbacks.py プロジェクト: aysonje/bleach
 def test_has_nofollow_already(self):
     attrs = {
         (None, 'href'): 'http://example.com',
         (None, 'rel'): 'nofollow',
     }
     assert nofollow(attrs) == attrs
コード例 #11
0
ファイル: test_callbacks.py プロジェクト: aysonje/bleach
 def test_mailto(self):
     attrs = {(None, 'href'): 'mailto:[email protected]'}
     assert nofollow(attrs) == attrs
コード例 #12
0
ファイル: test_callbacks.py プロジェクト: aysonje/bleach
 def test_basic(self):
     attrs = {(None, 'href'): 'http://example.com'}
     assert (
         nofollow(attrs) ==
         {(None, 'href'): 'http://example.com', (None, 'rel'): 'nofollow'}
     )
コード例 #13
0
 def test_has_nofollow_already(self):
     attrs = {
         (None, "href"): "http://example.com",
         (None, "rel"): "nofollow",
     }
     assert nofollow(attrs) == attrs
コード例 #14
0
 def test_mailto(self):
     attrs = {(None, "href"): "mailto:[email protected]"}
     assert nofollow(attrs) == attrs
コード例 #15
0
 def test_blank(self):
     attrs = {}
     assert nofollow(attrs) == attrs
コード例 #16
0
 def test_no_href(self):
     attrs = {'_text': 'something something'}
     assert nofollow(attrs) == attrs
コード例 #17
0
 def test_no_href(self):
     attrs = {"_text": "something something"}
     assert nofollow(attrs) == attrs