示例#1
0
 def test_federation_payment_not_found_raise(self, setup):
     builder_fed = Builder(
         address='GBTCBCWLE6YVTR5Y5RRZC36Z37OH22G773HECWEIZTZJSN4WTG3CSOES',
         sequence=100)
     with pytest.raises(
             FederationError,
             match=
             'Cannot determine Stellar Address to Account ID translation via Federation server.'
     ):
         builder_fed.federation_payment(fed_address="bad*fed-domain.com",
                                        amount="100.5",
                                        asset_code="XLM")
示例#2
0
 def test_federation_payment(self, setup):
     builder_fed = Builder(
         address='GBTCBCWLE6YVTR5Y5RRZC36Z37OH22G773HECWEIZTZJSN4WTG3CSOES',
         sequence=100)
     builder_fed.federation_payment(fed_address="fed*fed-domain.com",
                                    amount="100.5",
                                    asset_code="XLM")
     builder = Builder(
         address='GBTCBCWLE6YVTR5Y5RRZC36Z37OH22G773HECWEIZTZJSN4WTG3CSOES',
         sequence=100).add_text_memo("hello memo").append_payment_op(
             destination=
             'GBTCBCWLE6YVTR5Y5RRZC36Z37OH22G773HECWEIZTZJSN4WTG3CSOES',
             asset_code='XLM',
             amount="100.5")
     assert builder_fed.hash() == builder.hash()