cic-stack/apps/cic-ussd/tests/integration/ext/validator.py

12 lines
334 B
Python
Raw Normal View History

2021-06-03 15:40:51 +02:00
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