Fix for unit testing

This commit is contained in:
Oliver Walters 2021-03-30 08:08:55 +11:00
parent 709bfb1bd2
commit 408b9d5e5b

View File

@ -73,10 +73,10 @@ class SalesOrderTest(TestCase):
self.assertFalse(self.order.is_fully_allocated())
def test_add_duplicate_line_item(self):
# Adding a duplicate line item to a SalesOrder must throw an error
# Adding a duplicate line item to a SalesOrder is accepted
with self.assertRaises(IntegrityError):
SalesOrderLineItem.objects.create(order=self.order, part=self.part)
for ii in range(1, 5):
SalesOrderLineItem.objects.create(order=self.order, part=self.part, quantity=ii)
def allocate_stock(self, full=True):