summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-12-14 15:29:59 +0000
committerMichael Williamson <mike@zwobble.org>2013-12-14 15:29:59 +0000
commitde040b5c92e20d0b578be0cc4b63e032ae5698bc (patch)
tree96ff0aae287379a535e7e6b711741ed8ffcb1f11 /tests
parent8cf77f91fa81823af6c84ed7ca97a3a21dc89d6b (diff)
Handle element freshness when satisfying HTML paths
Diffstat (limited to 'tests')
-rw-r--r--tests/html_generation_tests.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/html_generation_tests.py b/tests/html_generation_tests.py
index 4a8a43c..4322d69 100644
--- a/tests/html_generation_tests.py
+++ b/tests/html_generation_tests.py
@@ -126,3 +126,15 @@ class SatisfyPathTests(object):
satisfy_html_path(generator, path)
generator.text("there")
assert_equal('<blockquote><span>Hello</span><p>there', generator.html_string())
+
+
+ @istest
+ def fresh_element_matches_nothing(self):
+ generator = HtmlGenerator()
+ generator.start("blockquote")
+ generator.start("p")
+ generator.text("Hello")
+ path = html_paths.path([html_paths.element(["blockquote"]), html_paths.element(["p"], fresh=True)])
+ satisfy_html_path(generator, path)
+ generator.text("there")
+ assert_equal('<blockquote><p>Hello</p><p>there', generator.html_string())