We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d44497 commit 47b9a35Copy full SHA for 47b9a35
test/test_stock.py
@@ -248,6 +248,25 @@ def test_barcode_support(self):
248
249
item.unassignBarcode()
250
251
+ def test_serialized(self):
252
+ """Test serializing multiple objects on create"""
253
+
254
+ # Create items with serial numbers
255
+ items = StockItem.create(
256
+ self.api,
257
+ {
258
+ "part": 10004,
259
+ "quantity": 3,
260
+ "serial_numbers": "1005,1006,1007"
261
+ }
262
+ )
263
264
+ self.assertEqual(3, len(items))
265
266
+ self.assertEqual('1005', items[0].serial)
267
+ self.assertEqual('1006', items[1].serial)
268
+ self.assertEqual('1007', items[2].serial)
269
270
271
class StockAdjustTest(InvenTreeTestCase):
272
"""Unit tests for stock 'adjustment' actions"""
0 commit comments