예제 #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
 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
 def test_no_href(self):
     attrs = {'_text': 'something something'}
     assert nofollow(attrs) == attrs
예제 #8
0
 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
 def test_has_nofollow_already(self):
     attrs = {
         (None, 'href'): 'http://example.com',
         (None, 'rel'): 'nofollow',
     }
     assert nofollow(attrs) == attrs
예제 #11
0
 def test_mailto(self):
     attrs = {(None, 'href'): 'mailto:[email protected]'}
     assert nofollow(attrs) == attrs
예제 #12
0
 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