mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-13 08:21:26 +00:00
Add function to get all test results as a map
- This will be required for pushing out to a test report
This commit is contained in:
@ -423,3 +423,11 @@ class TestResultTest(StockTest):
|
||||
# Passing tests
|
||||
self.assertEqual(item.getTestResults(result=True).count(), 3)
|
||||
self.assertEqual(item.getTestResults(result=False).count(), 1)
|
||||
|
||||
# Result map
|
||||
result_map = item.testResultMap()
|
||||
|
||||
self.assertEqual(len(result_map), 3)
|
||||
|
||||
for test in ['Firmware Version', 'Settings Checksum', 'Temperature Test']:
|
||||
self.assertIn(test, result_map.keys())
|
Reference in New Issue
Block a user