

@responses.activate
def test_googl_short_method_bad_status_code():
    body = "{'bad': 'test'}"
    url = '{}?key={}'.format(s.api_url, api_key)
    responses.add(responses.POST, url, body=body, match_querystring=True, status=400)
    with pytest.raises(ShorteningErrorException):
        s.short(expanded)

dataset/ETHPy150Open ellisonleao/pyshorteners/tests/test_googl.py test_googl_short_method_bad_status_code/original