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 app.test.py like this:

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

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/app_test.py:24: AssertionError

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

def create_app():
    app = Flask(__name__)

    @app.route("/")
    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)
            else:
                #?
                return render_template("you_died.html")
        else:
            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)
                else:
                    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__":
    create_app.run()

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 app.py code if the variable room_name is not present it renders “you_died.html”
Can someone help me? Ty <3