def test_command(command): model = GameModel() model.acceptCommand(command) assert len(model._commands) == 1 model.tickUpdate() assert command.execute.call_count == 1
def test_call_collision(arcadeFactory, missile, basicEnemy): model = GameModel() model._factory = arcadeFactory model._birds = [missile] model._enemies = [basicEnemy] model.tickUpdate() assert basicEnemy.colision.call_count == 1