feat(admin): show inspection score breakdown
This commit is contained in:
1 parent
0b1f2c1063
commit
6235368baf
3 files changed
+15
-6
No files matched your search
@@ -267,6 +267,15 @@ class ReportTests(unittest.TestCase):
|
||||
)
|
||||
self.assertEqual(calculate_inspection(report).points, 7 + 3 + 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1)
|
||||
|
||||
def test_inspection_resource_aliases_cover_plain_and_water_filled_moss(self):
|
||||
report = InspectionReport(
|
||||
"Белка", 1, "дупло", 0,
|
||||
(("мох", 1), ("наполненный водой мох", 2)),
|
||||
)
|
||||
result = calculate_inspection(report)
|
||||
self.assertEqual(result.points, 7)
|
||||
self.assertEqual([item["points"] for item in result.resource_points], [3, 4])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in new issue
Block a user