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", }
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' })
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'} )
def test_has_nofollow_already(self): attrs = { (None, 'href'): 'http://example.com', (None, 'rel'): 'nofollow', } assert nofollow(attrs) == attrs
def test_mailto(self): attrs = {(None, 'href'): 'mailto:[email protected]'} assert nofollow(attrs) == attrs
def test_basic(self): attrs = {(None, 'href'): 'http://example.com'} assert (nofollow(attrs) == { (None, 'href'): 'http://example.com', (None, 'rel'): 'nofollow' })
def test_no_href(self): attrs = {'_text': 'something something'} assert nofollow(attrs) == attrs
def test_blank(self): attrs = {} assert nofollow(attrs) == attrs
def test_basic(self): attrs = {(None, "href"): "http://example.com"} assert nofollow(attrs) == { (None, "href"): "http://example.com", (None, "rel"): "nofollow", }
def test_basic(self): attrs = {(None, 'href'): 'http://example.com'} assert ( nofollow(attrs) == {(None, 'href'): 'http://example.com', (None, 'rel'): 'nofollow'} )
def test_has_nofollow_already(self): attrs = { (None, "href"): "http://example.com", (None, "rel"): "nofollow", } assert nofollow(attrs) == attrs
def test_mailto(self): attrs = {(None, "href"): "mailto:[email protected]"} assert nofollow(attrs) == attrs
def test_no_href(self): attrs = {"_text": "something something"} assert nofollow(attrs) == attrs