示例#1
0
def test_failed_endpoint_send():
    response = get_failed_response()

    assert response.success is False
    assert response.status_code == 400
    assert response.json == FAILED_RESPONSE_BODY
    assert not response.errors == []
    assert response.errors == FAILED_RESPONSE_BODY.get('data').get('failures')
示例#2
0
def test_failed_response_rate_limit_reset():
    response = get_failed_response()
    assert response.rate_limit.reset == int(HEADERS.get('X-Ratelimit-Reset'))
示例#3
0
def test_failed_response_rate_limit_remaining():
    response = get_failed_response()
    assert response.rate_limit.remaining == int(
        HEADERS.get('X-Ratelimit-Remaining'))
示例#4
0
def test_failed_response_request_id():
    response = get_failed_response()
    assert response.request_id == FAILED_RESPONSE_BODY['request_id']
示例#5
0
def test_failed_response_status_code():
    response = get_failed_response()
    assert response.status_code == 400
示例#6
0
def test_response_errors_on_failed_response():
    response = get_failed_response()
    assert response.errors == FAILED_RESPONSE_BODY.get('data').get('failures')
示例#7
0
def test_failed_response_success():
    response = get_failed_response()
    assert response.success is False
示例#8
0
def test_failed_response_json():
    response = get_failed_response()
    assert response.json == FAILED_RESPONSE_BODY