def test_resulted_auto(invoice): invoice.CAEStatus = 'wait' invoice.CAEStatus = 'valid' invoice.CAEStatus = 'paid' request_params = {'amount': int(invoice.topay()), 'mode': 'cheque'} record_payment(invoice, **request_params) assert invoice.CAEStatus == 'resulted'
def test_resulted_manual(invoice): invoice.CAEStatus = 'wait' invoice.CAEStatus = 'valid' invoice.CAEStatus = 'paid' request_params = {'amount': 0, 'mode': 'cheque', 'resulted': True} record_payment(invoice, **request_params) assert invoice.CAEStatus == 'resulted'
def test_resulted_auto(invoice): invoice.CAEStatus = 'wait' invoice.CAEStatus = 'valid' invoice.CAEStatus = 'paid' request_params = {'amount':int(invoice.topay()), 'mode':'cheque'} record_payment(invoice, **request_params) assert invoice.CAEStatus == 'resulted'
def test_resulted_manual(invoice): invoice.CAEStatus = 'wait' invoice.CAEStatus = 'valid' invoice.CAEStatus = 'paid' request_params = {'amount':0, 'mode':'cheque', 'resulted':True} record_payment(invoice, **request_params) assert invoice.CAEStatus == 'resulted'
def test_record_payment(invoice): request_params = {'amount': 1500, 'mode': 'cheque'} record_payment(invoice, **request_params) assert len(invoice.payments) == 3 assert invoice.payments[2].amount == 1500
def test_record_payment(invoice): request_params = {'amount':1500, 'mode':'cheque'} record_payment(invoice, **request_params) assert len(invoice.payments) == 3 assert invoice.payments[2].amount == 1500