def test_mixture(self):
     example = ('Foo href="http://localhost/analyse/?u=7&m=9" '
                'href="http://foo.com/frob?b=3#bar" '
                'Baz')
     expected = ('Foo href="http://localhost/analyse/?u=7&m=9" '
                 'href="http://foo.com/frob?b=3#bar" '
                 'Baz')
     self.assertEqual(
         bookmark_utils.unescape_href(example), expected)
 def test_escaped_url(self):
     example = "href='http://localhost/analyse/?u=7&m=9#bong'"
     expected = "href='http://localhost/analyse/?u=7&m=9#bong'"
     self.assertEqual(
         bookmark_utils.unescape_href(example), expected)
 def test_no_url(self):
     example = "Foo bar"
     self.assertEqual(
         bookmark_utils.unescape_href(example), example)
 def test_unescaped_url(self):
     example = "Foo bar href='http://foo.com/frob?b=3#bar'"
     self.assertEqual(
         bookmark_utils.unescape_href(example), example)
示例#5
0
 def test_escaped_url(self):
     example = "href='http://localhost/analyse/?u=7&m=9#bong'"
     expected = "href='http://localhost/analyse/?u=7&m=9#bong'"
     self.assertEqual(
         bookmark_utils.unescape_href(example), expected)