示例#1
0
def test_transaction():
    transaction = Transaction(
        amount=1000,
        order_id=1,
        meta=dict(card_number="xyz"),
    )
    transaction_dict = transaction.to_dict()
    assert transaction_dict["amount"] == transaction.amount
示例#2
0
 def test_transaction(self):
     transaction = Transaction(amount=1000,
                               order_id=1,
                               meta=dict(card_number='xyz'))
     transaction_dict = transaction.to_dict()
     self.assertEqual(transaction_dict['amount'], transaction.amount)