コード例 #1
0
    def test_bank_is_successful(self):
        bank = Bank()
        payment = Payment()
        payment.source = "bank"
        payment.bank = bank

        self.assertTrue(payment.is_successful())
コード例 #2
0
    def test_card_is_successful_errored(self):
        card = Card()
        card.status = "errored"
        payment = Payment()
        payment.source = "card"
        payment.card = card

        self.assertFalse(payment.is_successful())
コード例 #3
0
    def test_card_is_successful(self):
        card = Card()
        card.status = "processed"
        payment = Payment()
        payment.source = "card"
        payment.card = card

        self.assertTrue(payment.is_successful())
コード例 #4
0
    def test_is_successful(self):
        bank = Bank()
        bank.status = "processed"
        payment = Payment()
        payment.source = "bank"
        payment.bank = bank

        self.assertTrue(payment.is_successful())