fix: correct inspection resource points

This commit is contained in:
nyan404 committed 2026-09-09 23:04:42 +03:00
1 parent 8e4522d211
commit d2f853b8f6
6 files changed
+16 -6

No files matched your search

+3 -2
View File
@@ -262,9 +262,10 @@ class ReportTests(unittest.TestCase):
character_name="Белка", character_id=1, place="дупло", inspections=0,
resources=(("ПАУТИНАА", 1), ("обычный мохх", 1), ("водяной мох", 1),
("Луговая змея", 1), ("змеяя", 1), ("щитомордник", 1),
("аспид", 1), ("бурундук", 1)),
("аспид", 1), ("бурундук", 1), ("дичь", 1), ("гнездо", 1),
("ядовитая дичь", 1), ("ядовитый гриб", 1)),
)
self.assertEqual(calculate_inspection(report).points, 7 + 3 + 2 + 1 + 1 + 1 + 1 + 1)
self.assertEqual(calculate_inspection(report).points, 7 + 3 + 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1)
if __name__ == "__main__":
+1
View File
@@ -82,6 +82,7 @@ class VkBotTests(unittest.TestCase):
def test_button_payload_maps_to_command(self):
self.assertEqual(BelkiBot._button_text({"payload": "menu:lu"}), "/лу")
self.assertEqual(BelkiBot._button_text({"payload": '{"command":"confirm:yes"}'}), "да")
self.assertEqual(BelkiBot._button_text({"payload": '{"command":"quick:inscription"}'}), "+1 надпись")
self.assertEqual(BelkiBot._button_text({"payload": '{"command":"application:flying"}'}), "/летяга")
self.assertEqual(BelkiBot._button_text({"payload": '{"command":"application:practice-no"}'}), "нет")
+1
View File
@@ -415,6 +415,7 @@ class VkConversationTests(unittest.TestCase):
inspection.handle(505, "0")
inspection.handle(505, "Серолап [2]")
labels = [button["action"]["label"] for row in inspection.keyboard_for(505)["buttons"] for button in row]
self.assertIn("Надпись", labels)
self.assertIn("Без ресурсов", labels)
def test_points_calculator_is_available_from_vk_menu_and_is_interactive(self):