From 34bfdea4b5458168365dfe256c661b3cb825c0d5 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 29 Aug 2019 23:48:18 +1000 Subject: [PATCH] Test another invalid serialization --- InvenTree/stock/tests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/InvenTree/stock/tests.py b/InvenTree/stock/tests.py index bc92a4c056..437464a77a 100644 --- a/InvenTree/stock/tests.py +++ b/InvenTree/stock/tests.py @@ -267,6 +267,9 @@ class StockTest(TestCase): with self.assertRaises(ValidationError): item.serializeStock(5, [1, 2, 3, 4, 5], self.user) + with self.assertRaises(ValidationError): + item.serializeStock(5, [1, 2, 3], self.user) + # Pick a StockItem which can actually be serialized item = StockItem.objects.get(pk=100) @@ -284,7 +287,7 @@ class StockTest(TestCase): with self.assertRaises(ValidationError): item.serializeStock(3, "hello", self.user) - def test_seiralize_stock_valid(self): + def test_serialize_stock_valid(self): """ Perform valid stock serializations """ # There are 10 of these in stock