tests: avoid invalid HTML markup in the tests.

This commit is contained in:
Vladimír Vondruš 2017-12-10 21:38:28 +01:00
commit fb587e1ae6

View file

@ -294,28 +294,28 @@ class TestPage(LoggedTestCase):
args['content'] = (
'A simple test, with a '
'<a href="|filename|article.rst'
'?utm_whatever=234&highlight=word">link</a>'
'?utm_whatever=234&amp;highlight=word">link</a>'
)
content = Page(**args).get_content('http://notmyidea.org')
self.assertEqual(
content,
'A simple test, with a '
'<a href="http://notmyidea.org/article.html'
'?utm_whatever=234&highlight=word">link</a>'
'?utm_whatever=234&amp;highlight=word">link</a>'
)
# combination
args['content'] = (
'A simple test, with a '
'<a href="|filename|article.rst'
'?utm_whatever=234&highlight=word#section-2">link</a>'
'?utm_whatever=234&amp;highlight=word#section-2">link</a>'
)
content = Page(**args).get_content('http://notmyidea.org')
self.assertEqual(
content,
'A simple test, with a '
'<a href="http://notmyidea.org/article.html'
'?utm_whatever=234&highlight=word#section-2">link</a>'
'?utm_whatever=234&amp;highlight=word#section-2">link</a>'
)
# also test for summary in metadata