def test_tap_and_untap(self): creature_state = CreatureStateFactory(tapped=False) normalized = creature_state.normalize() creature_state.tap() self.assertNotEqual(creature_state.normalize(), normalized) normalized = creature_state.normalize() creature_state.untap() self.assertNotEqual(creature_state.normalize(), normalized)
def test_attack(self): """Test that .attack() is saved when normalized.""" state = CreatureStateFactory(tapped=False) normalized = state.normalize() state.attack() self.assertTrue(state.attacking) self.assertNotEqual(state.normalize(), normalized) state.remove_from_combat() self.assertEqual(state.normalize(), normalized)
def test_block(self): """Test that .block(uid) is saved when normalized.""" state = CreatureStateFactory(tapped=False) self.assertFalse(state.blocking) normalized = state.normalize() state.block(47) self.assertEqual(state.blocking, 47) self.assertNotEqual(state.normalize(), normalized) state.remove_from_combat() self.assertEqual(state.normalize(), normalized)