Python3 Ex52 Cannot setup flask to run automated tests

I’ve been following the book and completing every exercise regularly without any major issue up to the final one.
I’m stuck at

Your task in this part of the exercise is to complete the map and make the automated test completely
validate the whole map. This includes fixing all the generic_death objects to be real endings. Make
sure this works really well and that your test is as complete as possible because we’ll be changing this
map later, and you’ll use the tests to make sure it keeps working.

In order to test the game using flask i tried setting up a function in like this:

def test_game_correct(client):
    with client:
        response ="game"), data={
            "room_name": "central_corridor",
            "action": "tell a joke"
        }, follow_redirects = True)
        assert b"Laser Weapon Armory" in

The issue is that, regardless of what i put into the “data” variable when i run pytest i am greeted with

E           assert b'Laser Weapon Armory' in b'<h1>You Died!</h1>\n\n<p>Looks like you bit the dust.</p>\n<p><a href="/">Play Again</a></p>'
E            +  where b'<h1>You Died!</h1>\n\n<p>Looks like you bit the dust.</p>\n<p><a href="/">Play Again</a></p>' = <WrapperTestResponse 89 bytes [200 OK]>.data

tests/ AssertionError

I haven’t changed anything about the previous parts except for the where I organized everything under a function

def create_app():
    app = Flask(__name__)

    def index():
        #this is used to "setup" the session with starting values
        session["room_name"] = planisphere.START
        return redirect(url_for("game"))

    @app.route("/game", methods = ["GET", "POST"])
    def game():
        room_name = session.get("room_name")

        if request.method == "GET":
            if room_name:
                room = planisphere.load_room(room_name)
                return render_template("show_room.html", room = room)
                return render_template("you_died.html")
            action = request.form.get("action")

            if room_name and action:
                room = planisphere.load_room(room_name)
                next_room = room.go(action)

                if not next_room:
                    session["room_name"] = planisphere.name_room(room)
                    session["room_name"] = planisphere.name_room(next_room)

            return redirect(url_for("game"))
    app.secret_key = "A0Zr98j/3yX R~XHH!jmN]LWX/,?RT"
    return app

if __name__ == "__main__":

So what is the issue with my code? I cannot wrap my head around it. It must have to do with the data variable as in the code if the variable room_name is not present it renders “you_died.html”
Can someone help me? Ty <3