Esempio n. 1
0
def test_get_orderbook_exception(http_mock, exchange_coinone):
    http_mock.return_value = not_found()
    loop = asyncio.get_event_loop()
    error, result = loop.run_until_complete(
        exchange_coinone.get_orderbook("LUNA"))
    assert error is not None
    assert result is None
Esempio n. 2
0
def test_get_account_exception(http_mock, lcd_node):
    http_mock.return_value = not_found()
    loop = asyncio.get_event_loop()
    result = loop.run_until_complete(
        lcd_node.get_account("terra1tngw4yusyas9ujlcmxdn7xkx6az07hej72rssm")
    )
    assert result is None
Esempio n. 3
0
def test_get_latest_block_exception(http_mock, lcd_node):
    http_mock.return_value = not_found()
    loop = asyncio.get_event_loop()
    result = loop.run_until_complete(
        lcd_node.get_latest_block()
    )
    assert result is None
Esempio n. 4
0
def test_get_oracle_active_denoms_exception(http_mock, lcd_node):
    http_mock.return_value = not_found()
    loop = asyncio.get_event_loop()
    result = loop.run_until_complete(
        lcd_node.get_oracle_active_denoms()
    )
    assert result is None
Esempio n. 5
0
def test_broadcast_tx_async_exception(http_mock, lcd_node):
    http_mock.return_value = not_found()
    loop = asyncio.get_event_loop()
    result = loop.run_until_complete(
        lcd_node.broadcast_tx_async(
            "36F6ABBE0A686D4DAC5F557EE562B421D7C47AB6DE77B986AA6D925E41645AFA")
    )
    assert result is None
Esempio n. 6
0
def test_get_oracle_prevotes_validator_exception(http_mock, lcd_node):
    http_mock.return_value = not_found()
    loop = asyncio.get_event_loop()
    result = loop.run_until_complete(
        lcd_node.get_oracle_prevotes_validator(
            "mnt", "terravaloper1lsgzqmtyl99cxjs2rdrwvda3g6g6z8d3g8tfzu")
    )
    assert result is None