'Tests the ACCEPTED path of process_postpay'

@patch('shoppingcart.processors.CyberSource.verify_signatures', Mock(return_value=True))
def test_process_postpay_accepted(self):

    student1 = UserFactory()
    student1.save()
    order1 = Order.get_cart_for_user(student1)
    params = {'card_accountNumber': '1234', 'card_cardType': '001', 'billTo_firstName': student1.first_name, 'orderNumber': str(order1.id), 'orderCurrency': 'usd', 'decision': 'ACCEPT', 'ccAuthReply_amount': '0.00'}
    result = process_postpay_callback(params)
    self.assertTrue(result['success'])
    self.assertEqual(result['order'], order1)
    order1 = Order.objects.get(id=order1.id)
    self.assertEqual(order1.status, 'purchased')
    self.assertFalse(result['error_html'])
