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 c005ef8 commit 2d35cf2Copy full SHA for 2d35cf2
1 file changed
test/test_build.py
@@ -12,7 +12,7 @@
12
from test_api import InvenTreeTestCase # noqa: E402
13
14
from inventree.base import Attachment # noqa: E402
15
-from inventree.build import Build # noqa: E402
+from inventree.build import Build, BuildLine # noqa: E402
16
17
18
class BuildOrderTest(InvenTreeTestCase):
@@ -144,3 +144,16 @@ def test_build_complete(self):
144
# Check status
145
self.assertEqual(build.status, 40)
146
self.assertEqual(build.status_text, 'Complete')
147
+
148
+ def test_build_lines(self):
149
+ """ Test retrieval of build line items. """
150
151
+ build = self.get_build()
152
153
+ lines = build.getLines()
154
155
+ self.assertGreater(len(lines), 0)
156
157
+ for line in lines:
158
+ self.assertEqual(line.build, build.pk)
159
+ self.assertIsInstance(line, BuildLine)
0 commit comments