def test_instance_full(): iid = 'instance_full_iid' player = '*****@*****.**' game = Game.get_or_insert(key_name = gid) instance = GameInstance(parent = game, key_name = iid, players = [player], leader = player) assert not instance.full instance.max_players = 1 assert not instance.full instance.put() assert instance.full instance.max_players = 2 instance.put() assert not instance.full instance.players = [player, '*****@*****.**'] instance.put() assert instance.full instance.max_players = 0 instance.put() assert not instance.full
def test_instance_full(): iid = 'instance_full_iid' player = '*****@*****.**' game = Game.get_or_insert(key_name=gid) instance = GameInstance(parent=game, key_name=iid, players=[player], leader=player) assert not instance.full instance.max_players = 1 assert not instance.full instance.put() assert instance.full instance.max_players = 2 instance.put() assert not instance.full instance.players = [player, '*****@*****.**'] instance.put() assert instance.full instance.max_players = 0 instance.put() assert not instance.full