fix: normalize inspection resource names

This commit is contained in:
nyan404 committed 2026-08-16 16:46:11 +03:00
1 parent 6b9c6c2f84
commit 2752673682
3 files changed
+24 -5

No files matched your search

+8
View File
@@ -124,6 +124,14 @@ class ReportTests(unittest.TestCase):
self.assertEqual(calculate_inspection(report).points, 11)
self.assertIn("Баллы осмотра: 11 баллы.", render_inspection(report))
def test_inspection_resource_aliases_and_typos(self):
report = InspectionReport(
character_name="Белка", character_id=1, place="дупло", inspections=0,
resources=(("ПАУТИНАА", 1), ("обычный мохх", 1), ("водяной мох", 1),
("Луговая змея", 1), ("змеяя", 1), ("бурундук", 1)),
)
self.assertEqual(calculate_inspection(report).points, 7 + 3 + 2 + 1 + 0 + 1)
if __name__ == "__main__":
unittest.main()