2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-20 22:06:28 +00:00

Bug fixes for BuildItemCreate view:

- Add option to calculate required quantity against a particular build output, not just the build
This commit is contained in:
Oliver Walters
2020-10-23 23:09:22 +11:00
parent 076d5c4f7f
commit 0752df26dc
3 changed files with 65 additions and 29 deletions

View File

@ -28,10 +28,12 @@ class BomItemTest(TestCase):
self.assertEqual(self.bob.bom_count, 4)
def test_in_bom(self):
parts = self.bob.required_parts()
parts = self.bob.getRequiredParts()
self.assertIn(self.orphan, parts)
# TODO: Tests for multi-level BOMs
def test_used_in(self):
self.assertEqual(self.bob.used_in_count, 0)
self.assertEqual(self.orphan.used_in_count, 1)