Beispiel #1
0
 def test_native_asset(self):
     asset_1 = Asset("PMN")
     asset_2 = Asset.native()
     assert asset_1 == asset_2
     assert asset_1.code == "PMN"
     assert asset_1.issuer is None
     assert asset_1.type == "native"
     assert asset_1.to_dict() == {"type": "native"}
Beispiel #2
0
 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
     }