def test_iconomi_assets_are_known( database, inquirer, # pylint: disable=unused-argument ): unsupported_assets = set(UNSUPPORTED_ICONOMI_ASSETS) common_items = unsupported_assets.intersection( set(WORLD_TO_ICONOMI.values())) assert not common_items, f'Iconomi assets {common_items} should not be unsupported' # use a real Iconomi instance so that we always get the latest data iconomi = Iconomi( name='iconomi1', api_key=make_api_key(), secret=make_api_secret(), database=database, msg_aggregator=MessagesAggregator(), ) supported_tickers = iconomi.query_supported_tickers() for ticker in supported_tickers: try: _ = asset_from_iconomi(ticker) except UnknownAsset as e: test_warnings.warn( UserWarning( f'Found unknown asset {e.asset_name} in ICONOMI. ' f'Support for it has to be added', ))
def test_iconomi_assets_are_known( database, inquirer, # pylint: disable=unused-argument ): # use a real Iconomi instance so that we always get the latest data iconomi = Iconomi( api_key=make_api_key(), secret=make_api_secret(), database=database, msg_aggregator=MessagesAggregator(), ) supported_tickers = iconomi.query_supported_tickers() for ticker in supported_tickers: try: _ = iconomi_asset(ticker) except UnknownAsset as e: test_warnings.warn( UserWarning( f'Found unknown asset {e.asset_name} in ICONOMI. ' f'Support for it has to be added', ))