File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1212from test_api import InvenTreeTestCase # noqa: E402
1313
1414from inventree .base import Attachment # noqa: E402
15- from inventree .build import Build # noqa: E402
15+ from inventree .build import Build , BuildLine # noqa: E402
1616
1717
1818class BuildOrderTest (InvenTreeTestCase ):
@@ -144,3 +144,16 @@ def test_build_complete(self):
144144 # Check status
145145 self .assertEqual (build .status , 40 )
146146 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 )
You can’t perform that action at this time.
0 commit comments