mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-04 22:38:49 +00:00
Test another invalid serialization
This commit is contained in:
parent
af3faa5369
commit
34bfdea4b5
@ -267,6 +267,9 @@ class StockTest(TestCase):
|
|||||||
with self.assertRaises(ValidationError):
|
with self.assertRaises(ValidationError):
|
||||||
item.serializeStock(5, [1, 2, 3, 4, 5], self.user)
|
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
|
# Pick a StockItem which can actually be serialized
|
||||||
item = StockItem.objects.get(pk=100)
|
item = StockItem.objects.get(pk=100)
|
||||||
|
|
||||||
@ -284,7 +287,7 @@ class StockTest(TestCase):
|
|||||||
with self.assertRaises(ValidationError):
|
with self.assertRaises(ValidationError):
|
||||||
item.serializeStock(3, "hello", self.user)
|
item.serializeStock(3, "hello", self.user)
|
||||||
|
|
||||||
def test_seiralize_stock_valid(self):
|
def test_serialize_stock_valid(self):
|
||||||
""" Perform valid stock serializations """
|
""" Perform valid stock serializations """
|
||||||
|
|
||||||
# There are 10 of these in stock
|
# There are 10 of these in stock
|
||||||
|
Loading…
x
Reference in New Issue
Block a user