Beispiel #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)
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)
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)
def test_exchange_bittrex_class():
    conf = _stub_config()
    b = Bittrex(conf)
    assert isinstance(b, Bittrex)
    slots = dir(b)
    for name in ['fee', 'buy', 'sell', 'get_balance', 'get_balances',
                 'get_ticker', 'get_ticker_history', 'get_order',
                 'cancel_order', 'get_pair_detail_url', 'get_markets',
                 'get_market_summaries', 'get_wallet_health']:
        assert name in slots
Beispiel #5
0
def test_validate_response_success():
    response = {
        'message': '',
        'result': [],
    }
    Bittrex._validate_response(response)
def test_validate_response_success():
    response = {
        'message': '',
        'result': [],
    }
    Bittrex._validate_response(response)