2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-13 08:21:26 +00:00

Add function to generate "keys" for test results.

- As the keys are to be used for dict-based lookup (in a template) then they cannot contains spaces.
- May as well enforce lower-case encoding!
This commit is contained in:
Oliver Walters
2020-05-17 12:59:03 +10:00
parent c54cb2b280
commit 17f241774f
3 changed files with 18 additions and 2 deletions

View File

@ -429,5 +429,6 @@ class TestResultTest(StockTest):
self.assertEqual(len(result_map), 3)
for test in ['Firmware Version', 'Settings Checksum', 'Temperature Test']:
# Keys are all lower-case and do not contain spaces
for test in ['firmwareversion', 'settingschecksum', 'temperaturetest']:
self.assertIn(test, result_map.keys())