It isn't always a 4/4 split
[naja.git] / naja / tests / test_actions.py
index 69ed8819ed54c80be1d87e89fe6eef8f931f931b..fb2c370b4cf11662543479a048564c1066a5951d 100644 (file)
@@ -32,6 +32,10 @@ class TestActions(TestCase):
         check_available(set([BITS.MSB]), [], False)
         check_available(set([BITS.MSB]), [BITS.MSB], True)
 
+    def test_bits_translation(self):
+        action = actions.LocationAction(set([BITS.NORTH, 'MSB']))
+        self.assertEqual(action.required_bits, set([BITS.NORTH, BITS.MSB]))
+
     def test_DoNothing(self):
         board = self.make_board()
         state_before = board.export()
@@ -42,7 +46,7 @@ class TestActions(TestCase):
     def test_LoseHealthOrMSB_MSB_clear(self):
         board = self.make_board()
         state_before = board.export()
-        actions.LoseHeathOrMSB(set()).perform_action(board, None)
+        actions.LoseHealthOrMSB(set()).perform_action(board, None)
         state_after = board.export()
         self.assertEqual(state_after['health'], state_before['health'] - 1)
 
@@ -53,7 +57,7 @@ class TestActions(TestCase):
     def test_LoseHealthOrMSB_MSB_set(self):
         board = self.make_board(player_bits=[BITS.MSB])
         state_before = board.export()
-        actions.LoseHeathOrMSB(set()).perform_action(board, None)
+        actions.LoseHealthOrMSB(set()).perform_action(board, None)
         state_after = board.export()
         self.assertEqual(board.player.bits.check_bit(BITS.MSB), False)