fix: validate earned inspection resources

This commit is contained in:
nyan404 committed 2026-08-25 13:50:18 +03:00
1 parent aa49634d93
commit d025f51733
5 files changed
+23 -3

No files matched your search

+4
View File
@@ -58,6 +58,10 @@ class ApiTests(unittest.TestCase):
"resources": [["паук", 1]],
})["result"]["points"], 5)
def test_points_inspection_rejects_malformed_resources(self):
with self.assertRaisesRegex(ApiError, "Каждый ресурс"):
calculate_payload({"mode": "points", "activity": "inspection", "place": "дупло", "inspections": 1, "resources": ["паук"]})
def test_goal_calculator_rejects_non_finite_json_number(self):
with self.assertRaisesRegex(ApiError, "конечным числом"):
calculate_payload({