diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-12-14 15:32:30 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-12-14 15:32:30 +0000 |
| commit | 93c52cf6be9633f97e903233db47648844407d2e (patch) | |
| tree | f7a27832e8672cbdf5500598c9f91ba1701e7762 /tests | |
| parent | de040b5c92e20d0b578be0cc4b63e032ae5698bc (diff) | |
Generate class attribute when satisfying HTML path
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/html_generation_tests.py | 9 |
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()) |
