fix: validate earned inspection resources
This commit is contained in:
1 parent
aa49634d93
commit
d025f51733
5 files changed
+23
-3
No files matched your search
@@ -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({
|
||||
|
||||
Reference in new issue
Block a user