From 663cc269b4c3fbd81c13592e60a958adfe7dae31 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 4 May 2019 23:22:32 +1000 Subject: [PATCH] Test recursive child count --- InvenTree/part/test_category.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/InvenTree/part/test_category.py b/InvenTree/part/test_category.py index f2a88c8eb9..ddbcf3babc 100644 --- a/InvenTree/part/test_category.py +++ b/InvenTree/part/test_category.py @@ -85,6 +85,8 @@ class CategoryTest(TestCase): self.assertEqual(self.fasteners.partcount, 2) self.assertEqual(self.capacitors.partcount, 1) + self.assertEqual(self.electronics.partcount, 3) + def test_delete(self): """ Test that category deletion moves the children properly """ @@ -126,4 +128,4 @@ class CategoryTest(TestCase): # And one part should have no default location at all W = Part.objects.get(name='Widget') - self.assertIsNone(W.get_default_location()) \ No newline at end of file + self.assertIsNone(W.get_default_location())