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)