Commit 03a4af7a by Diana Huang

Fix failing tests.

parent e7c07d4e
......@@ -116,14 +116,10 @@ class CyberSourceTests(TestCase):
order2 = Order.get_cart_for_user(student2)
record_purchase(params_cc, order1)
record_purchase(params_nocc, order2)
self.assertEqual(order1.bill_to_ccnum, '1234')
self.assertEqual(order1.bill_to_cardtype, 'Visa')
self.assertEqual(order1.bill_to_first, student1.first_name)
self.assertEqual(order1.status, 'purchased')
order2 = Order.objects.get(user=student2)
self.assertEqual(order2.bill_to_ccnum, '####')
self.assertEqual(order2.bill_to_cardtype, 'MasterCard')
self.assertEqual(order2.bill_to_first, student2.first_name)
self.assertEqual(order2.status, 'purchased')
......
......@@ -196,8 +196,8 @@ class ShoppingCartViewsTests(ModuleStoreTestCase):
((template, context), _) = render_mock.call_args
self.assertEqual(template, 'shoppingcart/receipt.html')
self.assertEqual(context['order'], self.cart)
self.assertIn(reg_item.orderitem_ptr, context['order_items'])
self.assertIn(cert_item.orderitem_ptr, context['order_items'])
self.assertIn(reg_item, context['order_items'])
self.assertIn(cert_item, context['order_items'])
self.assertFalse(context['any_refunds'])
@patch('shoppingcart.views.render_to_response', render_mock)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment