def get_default_cells(): estates = EstateFactory.get_default_estates() return [ MoneyCell('Case depart', 200), EstateCell(estates.pop(0)), CommunityChestCell(), EstateCell(estates.pop(0)), MoneyCell('Vidange de voiture', -200), EstateCell(estates.pop(0)), EstateCell(estates.pop(0)), LuckCell(), EstateCell(estates.pop(0)), EstateCell(estates.pop(0)), JailCell(), EstateCell(estates.pop(0)), EstateCell(estates.pop(0)), EstateCell(estates.pop(0)), EstateCell(estates.pop(0)), EstateCell(estates.pop(0)), EstateCell(estates.pop(0)), CommunityChestCell(), EstateCell(estates.pop(0)), EstateCell(estates.pop(0)), FreeParkingCell(), EstateCell(estates.pop(0)), LuckCell(), EstateCell(estates.pop(0)), EstateCell(estates.pop(0)), EstateCell(estates.pop(0)), EstateCell(estates.pop(0)), EstateCell(estates.pop(0)), EstateCell(estates.pop(0)), EstateCell(estates.pop(0)), GoToJailCell(), EstateCell(estates.pop(0)), EstateCell(estates.pop(0)), CommunityChestCell(), EstateCell(estates.pop(0)), EstateCell(estates.pop(0)), LuckCell(), EstateCell(estates.pop(0)), MoneyCell('Croquettes pour le chat', -200), EstateCell(estates.pop(0)), ]
def test_estate_factory(): estates = EstateFactory.get_default_estates() assert len(estates) == 28 assert len([e for e in estates if isinstance(e, StationEstate)]) == 4 assert len([e for e in estates if isinstance(e, DiceEstate)]) == 2