def test_spawnEnemy(arcadeFactory): model = GameModel() assert model is not None model._factory = arcadeFactory model.spawnEnemy() assert arcadeFactory.createEnemy.call_count == 1
def test_init(arcadeFactory): model = GameModel() assert model is not None model._factory = arcadeFactory model.initGame() assert model._cannon is not None assert arcadeFactory.createEnemy.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