Files
WoW-Hybrid-gateway/tests/durability_effect_slots_test.py

28 lines
1.0 KiB
Python

"""Check indistinguishable effect slots, catalogue disagreements and slot-name admission."""
import sys
import unittest
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "ops"))
from durability_effect_slots import profiles
class DurabilityEffectSlotsTest(unittest.TestCase):
def test_named_slot_requires_agreement(self):
equipment = {15: "MAINHAND", 16: "OFFHAND"}
octo = {10: [(0, 15), (2, 15)], 11: [(0, 15), (1, 16)], 12: [(0, 19)],
13: [(0, 15)], 14: [(1, 15)], 15: [(0, -1), (2, 15)]}
sql = dict(octo)
del sql[13]
sql[14] = [(2, 15)]
self.assertEqual(profiles(octo, sql, equipment, equipment),
[(10, 15, False), (11, -1, False), (12, -1, False), (15, 15, True)])
def test_native_slot_comes_from_equipment_name(self):
self.assertEqual(profiles({10: [(0, 2)]}, {10: [(0, 2)]}, {2: "HEAD"}, {4: "HEAD"}),
[(10, 4, False)])
if __name__ == "__main__":
unittest.main()