Beispiel #1
0
    def test_from_dict_recursive_amount(self):
        check_create = CheckCreate.from_dict(check_create_dict)

        expected_dict = {
            **check_create_dict,
            "transaction_type": "CheckCreate",
            "flags": 0,
        }
        self.assertEqual(expected_dict, check_create.to_dict())
 def test_all_fields(self):
     check_create = CheckCreate(
         account=ACCOUNT,
         sequence=WALLET.next_sequence_num,
         destination=DESTINATION.classic_address,
         destination_tag=DESTINATION_TAG,
         send_max=SENDMAX,
         expiration=EXPIRATION,
         invoice_id=INVOICE_ID,
     )
     response = submit_transaction(check_create, WALLET)
     self.assertEqual(response.status, ResponseStatus.SUCCESS)
     self.assertEqual(response.result["engine_result"], "tesSUCCESS")
     WALLET.next_sequence_num += 1
Beispiel #3
0
    def test_from_dict_recursive_transaction_tx_json(self):
        transaction = CheckCreate.from_dict(check_create_dict)
        sign_dict = {"secret": secret, "tx_json": transaction.to_dict()}
        sign = Sign.from_dict(sign_dict)

        expected_dict = {
            **sign_dict,
            "tx_json": transaction.to_dict(),
            "method": "sign",
            "fee_mult_max": 10,
            "fee_div_max": 1,
            "offline": False,
        }
        self.assertEqual(expected_dict, sign.to_dict())