U -_@sBddlZddlmZmZddlmZddlZGdddejZdS)N)patchMock)utilsc@s8eZdZdZedddddZedddddZd S) TestLogHelperz.https://test_url/this/is/the/url?query=123#aaazcrhelper.utils.HTTPSConnectionT)ZautospeccCs8t|ji|d|jjjddddddddS) Ntest_urlz{}2z content-typezcontent-lengthPUT/this/is/the/url?query=123#aaabodyheadersmethodurl)r_send_responseTEST_URLassert_called_once_with return_valuerequest)selfhttps_connection_mockr4/tmp/pip-unpacked-wheel-7s1ms2ou/tests/test_utils.pytest_send_succeeded_response s z*TestLogHelper.test_send_succeeded_responsecCsjt|jt|dt|jjj dd}d|dd}|jjj|dt t |dd d d dS) Nrr z,{"Status": "FAILED", "Data": {}, "Reason": "ZReasonz"}rr r r r ) rrrrrjsonloadsrrZ call_argsstrlen)rrresponseZ expected_bodyrrrtest_send_failed_responses z'TestLogHelper.test_send_failed_responseN)__name__ __module__ __qualname__rrrr!rrrrrs   r) rZ unittest.mockrrZcrhelperrZunittestZTestCaserrrrrs