##// END OF EJS Templates
tests: Add a method to AssertResponse to check value of elements.
Martin Bornhold -
r1046:40393b0a default
parent child Browse files
Show More
@@ -149,6 +149,10 b' class AssertResponse(object):'
149 element = self.get_element(css_selector)
149 element = self.get_element(css_selector)
150 assert expected_content in element.text_content()
150 assert expected_content in element.text_content()
151
151
152 def element_value_contains(self, css_selector, expected_content):
153 element = self.get_element(css_selector)
154 assert expected_content in element.value
155
152 def contains_one_link(self, link_text, href):
156 def contains_one_link(self, link_text, href):
153 doc = fromstring(self.response.body)
157 doc = fromstring(self.response.body)
154 sel = CSSSelector('a[href]')
158 sel = CSSSelector('a[href]')
General Comments 0
You need to be logged in to leave comments. Login now