network_inventory/core/tests/helper.py
2020-01-07 21:55:43 +01:00

13 lines
370 B
Python

def in_content(response, object_to_find):
decoded_content = response.content.decode('utf8')
if str(object_to_find) not in decoded_content:
return False
return True
def not_in_content(response, object_to_find):
decoded_content = response.content.decode('utf8')
if str(object_to_find) in decoded_content:
return False
return True