diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-12-14 15:03:26 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-12-14 15:03:26 +0000 |
| commit | c1eb161cc9d4b8e41d85643ba7b090f2f2d95471 (patch) | |
| tree | ba760723399c5cc9728a5061c1c88e6f0779330f /tests/html_generation_tests.py | |
| parent | f5af218e186ff49e0c277f75668c1256be9cd861 (diff) | |
Add attributes to self-closing tags
Diffstat (limited to 'tests/html_generation_tests.py')
| -rw-r--r-- | tests/html_generation_tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/html_generation_tests.py b/tests/html_generation_tests.py index 5978dfe..c637798 100644 --- a/tests/html_generation_tests.py +++ b/tests/html_generation_tests.py @@ -51,3 +51,9 @@ def elements_with_empty_string_text_are_not_generator(): generator.end_all() assert_equal("", generator.html_string()) + +@istest +def self_closing_tag_can_have_attributes(): + generator = HtmlGenerator() + generator.self_closing("br", {"data-blah": "42"}) + assert_equal('<br data-blah="42" />', generator.html_string()) |
