def test_get_redirect_url_proof_point_v3(self, url_: str, expected: str): """ Given: - URL with redirect URL Proof Point v3. When: - Given URL with redirect URL is valid. Then: - Ensure redirected URL is returned. """ from FormatURL import get_redirect_url_proof_point_v3 assert get_redirect_url_proof_point_v3(url_) == expected
def test_get_redirect_url_proof_point_v3_invalid(self, mocker, url_): """ Given: - Proof Point v3 URL. When: - Given URL is invalid and does not contain redirect URL. Then: - Ensure the full URL is returned. - Ensure a call to demisto.error is made. """ import demistomock as demisto mocker.patch.object(demisto, 'error') from FormatURL import get_redirect_url_proof_point_v3 assert get_redirect_url_proof_point_v3(url_) == url_ assert demisto.error.called