add test helpers to check for text in the HTML output
This commit is contained in:
parent
4b2951a1b4
commit
40ece7cc4f
|
@ -0,0 +1,12 @@
|
|||
def in_content(response, string):
|
||||
decoded_content = response.content.decode('utf8')
|
||||
if string not in decoded_content:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def not_in_content(response, string):
|
||||
decoded_content = response.content.decode('utf8')
|
||||
if string in decoded_content:
|
||||
return False
|
||||
return True
|
Loading…
Reference in New Issue