예제 #1
0
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'
예제 #2
0
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'
예제 #3
0
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'
예제 #4
0
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'
예제 #5
0
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
예제 #6
0
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