def test_native_asset(self): asset_1 = Asset("XLM") asset_2 = Asset.native() assert asset_1 == asset_2 assert asset_1.code == "XLM" assert asset_1.issuer is None assert asset_1.type == "native" assert asset_1.to_dict() == {"type": "native"}
def test_credit_alphanum12_asset(self): code = "Banana" issuer = "GCNY5OXYSY4FKHOPT2SPOQZAOEIGXB5LBYW3HVU3OWSTQITS65M5RCNY" type = "credit_alphanum12" asset = Asset(code, issuer) assert asset.code == code assert asset.issuer == issuer assert asset.type == type assert asset.to_dict() == {"type": type, "code": code, "issuer": issuer}