예제 #1
0
def test_validate_response_no_api_response():
    response = {
        'message': 'NO_API_RESPONSE',
        'result': None,
    }
    with pytest.raises(ContentDecodingError, match=r'.*NO_API_RESPONSE.*'):
        Bittrex._validate_response(response)
예제 #2
0
def test_validate_response_no_api_response():
    response = {
        'message': 'NO_API_RESPONSE',
        'result': None,
    }
    with pytest.raises(ContentDecodingError, match=r'.*NO_API_RESPONSE.*'):
        Bittrex._validate_response(response)
예제 #3
0
def test_validate_response_min_trade_requirement_not_met():
    response = {
        'message': 'MIN_TRADE_REQUIREMENT_NOT_MET',
        'result': None,
    }
    with pytest.raises(ContentDecodingError, match=r'.*MIN_TRADE_REQUIREMENT_NOT_MET.*'):
        Bittrex._validate_response(response)
예제 #4
0
def test_validate_response_success():
    response = {
        'message': '',
        'result': [],
    }
    Bittrex._validate_response(response)
예제 #5
0
def test_validate_response_success():
    response = {
        'message': '',
        'result': [],
    }
    Bittrex._validate_response(response)