Fix tests

This commit is contained in:
Nathan Chapman 2022-11-25 17:13:50 -07:00
parent bde5e8bade
commit fc247040fe

View File

@ -153,7 +153,7 @@ class CartTest(TestCase):
'options': {'Grind': 'Whole Beans'}, 'options': {'Grind': 'Whole Beans'},
'price_total': 13.4, 'price_total': 13.4,
'quantity': 1, 'quantity': 1,
'variant': 1 'variant': self.variant.pk
} }
) )
cart.add( cart.add(
@ -162,7 +162,7 @@ class CartTest(TestCase):
'options': {'Grind': 'Espresso'}, 'options': {'Grind': 'Espresso'},
'price_total': 13.4, 'price_total': 13.4,
'quantity': 1, 'quantity': 1,
'variant': 1 'variant': self.variant.pk
} }
) )
for item in cart.cart: for item in cart.cart:
@ -181,7 +181,7 @@ class CartTest(TestCase):
'options': {'Grind': 'Whole Beans'}, 'options': {'Grind': 'Whole Beans'},
'price_total': 13.4, 'price_total': 13.4,
'quantity': 1, 'quantity': 1,
'variant': 1 'variant': self.variant.pk
} }
) )
@ -198,7 +198,7 @@ class CartTest(TestCase):
'options': {'Grind': 'Whole Beans'}, 'options': {'Grind': 'Whole Beans'},
'price_total': 13.4, 'price_total': 13.4,
'quantity': 1, 'quantity': 1,
'variant': 1 'variant': self.variant.pk
} }
) )
self.assertEqual( self.assertEqual(
@ -213,7 +213,7 @@ class CartTest(TestCase):
'options': {'Grind': 'Espresso'}, 'options': {'Grind': 'Espresso'},
'price_total': 40.2, 'price_total': 40.2,
'quantity': 3, 'quantity': 3,
'variant': 1 'variant': self.variant.pk
} }
) )
self.assertEqual( self.assertEqual(
@ -236,7 +236,7 @@ class CartTest(TestCase):
'options': {'Grind': 'Whole Beans'}, 'options': {'Grind': 'Whole Beans'},
'price_total': 40.2, 'price_total': 40.2,
'quantity': 3, 'quantity': 3,
'variant': 1 'variant': self.variant.pk
} }
) )
self.assertEqual( self.assertEqual(
@ -272,7 +272,7 @@ class CartTest(TestCase):
'options': {'Grind': 'Whole Beans'}, 'options': {'Grind': 'Whole Beans'},
'price_total': 40.2, 'price_total': 40.2,
'quantity': 3, 'quantity': 3,
'variant': 1 'variant': self.variant.pk
} }
) )
self.assertEqual(len(cart), 3) self.assertEqual(len(cart), 3)
@ -292,7 +292,7 @@ class CartTest(TestCase):
'options': {'Grind': 'Whole Beans'}, 'options': {'Grind': 'Whole Beans'},
'price_total': 40.2, 'price_total': 40.2,
'quantity': 3, 'quantity': 3,
'variant': 1 'variant': self.variant.pk
} }
) )
self.assertEqual(cart.get_total_weight(), 3) self.assertEqual(cart.get_total_weight(), 3)