aboutsummaryrefslogtreecommitdiff
path: root/tests/html_generation_tests.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-12-14 15:32:30 +0000
committerMichael Williamson <mike@zwobble.org>2013-12-14 15:32:30 +0000
commit93c52cf6be9633f97e903233db47648844407d2e (patch)
treef7a27832e8672cbdf5500598c9f91ba1701e7762 /tests/html_generation_tests.py
parentde040b5c92e20d0b578be0cc4b63e032ae5698bc (diff)
Generate class attribute when satisfying HTML path
Diffstat (limited to 'tests/html_generation_tests.py')
-rw-r--r--tests/html_generation_tests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/html_generation_tests.py b/tests/html_generation_tests.py
index 4322d69..c39f886 100644
--- a/tests/html_generation_tests.py
+++ b/tests/html_generation_tests.py
@@ -138,3 +138,12 @@ class SatisfyPathTests(object):
satisfy_html_path(generator, path)
generator.text("there")
assert_equal('<blockquote><p>Hello</p><p>there', generator.html_string())
+
+
+ @istest
+ def attributes_are_generated_when_satisfying_elements(self):
+ generator = HtmlGenerator()
+ path = html_paths.path([html_paths.element(["p"], class_names=["tip"])])
+ satisfy_html_path(generator, path)
+ generator.text("Hello")
+ assert_equal('<p class="tip">Hello', generator.html_string())