Skip to content

Commit

Permalink
Update unit tests for build order
Browse files Browse the repository at this point in the history
  • Loading branch information
SchrodingersGat committed Aug 7, 2024
1 parent 27a1638 commit 0eddcb6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion inventree/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from . import api as inventree_api

INVENTREE_PYTHON_VERSION = "0.16.0"
INVENTREE_PYTHON_VERSION = "0.16.1"


logger = logging.getLogger('inventree')
Expand Down
16 changes: 16 additions & 0 deletions test/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,22 @@ def test_build_complete(self):
}
)

# Check that build status is pending
self.assertEqual(build.status, 10)

if self.api.api_version >= 233:
# Issue the build order
build.issue()
self.assertEqual(build.status, 20)

# Mark build order as "on hold" again
build.hold()
self.assertEqual(build.status, 25)

# Issue again
build.issue()
self.assertEqual(build.status, 20)

# Complete the build, even though it is not completed
build.complete(accept_unallocated=True, accept_incomplete=True)

Expand Down

0 comments on commit 0eddcb6

Please sign in to comment.