Adds external functions for validation.

This commit is contained in:
PhilipWafula 2021-05-14 10:30:05 +03:00
parent 6d541d38bc
commit 15d44c859e
Signed by untrusted user: mango-habanero
GPG Key ID: B00CE9034DA19FB7
1 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
import logging
logg = logging.getLogger()
logg.setLevel(logging.DEBUG)
def validate_response(response, expected_response):
"""Makes sure that the response received matches the expected response"""
logg.debug(f'RESPONSE: {response.content.decode("utf-8")}')
assert response.content.decode('utf-8') == expected_response