1
0
fin-defs/test/test_ids.py

17 lines
446 B
Python
Raw Normal View History

import pytest
import fin_defs
2024-08-09 14:56:28 +00:00
@pytest.mark.parametrize('asset', fin_defs.WELL_KNOWN_SYMBOLS.values())
def test_to_from_string_id(asset: fin_defs.Asset):
assert fin_defs.Asset.from_string_id(asset.to_string_id()) == asset
2024-08-09 14:56:28 +00:00
import fin_defs
2024-08-09 14:56:28 +00:00
@pytest.mark.parametrize('asset', fin_defs.WELL_KNOWN_SYMBOLS.values())
def test_to_from_polygon_id(asset: fin_defs.Asset):
assert fin_defs.Asset.from_polygon_id(asset.to_polygon_id()) == asset