network_inventory/network_inventory/inventory/tests/helper.py

13 lines
328 B
Python
Raw Normal View History

2019-08-11 21:35:21 +02:00
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