Revert "Revert 'Make tests for #1261'"

This reverts commit 3b2503a7d5.
This commit is contained in:
Rúnar Berg Baugsson Sigríðarson 2014-02-16 18:51:48 +00:00
commit 780fa38b7a
2 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,12 @@
<html>
<head>
</head>
<body>
<section id="double-quote-attribute-value">
Both double quoted attribute values should
be supported.
As well as single quoted, so they can accept some
<span data-json='{"key": "value"}'>JSON data-attributes</span>
</section>
</body>
</html>

View file

@ -374,6 +374,18 @@ class HTMLReaderTest(ReaderTest):
for key, value in expected.items():
self.assertEqual(value, page.metadata[key], key)
def test_article_with_attributes(self):
page = self.read_file(path='article_with_attributes.html')
self.assertEqual('''
<section id="double-quote-attribute-value">
Both double quoted attribute values should
be supported.
As well as single quoted, so they can accept some
<span data-json='{"key": "value"}'>JSON data-attributes</span>
</section>
''', page.content)
def test_article_with_null_attributes(self):
page = self.read_file(path='article_with_null_attributes.html')