Test recursive child count

This commit is contained in:
Oliver Walters 2019-05-04 23:22:32 +10:00
parent ab6673caa3
commit 663cc269b4

View File

@ -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())
self.assertIsNone(W.get_default_location())