def test_brackets_get_api():
    """Test that brackets API GET endpiont is behaving propertly"""
    app = create_ctfd()
    with app.app_context():
        gen_bracket(app.db, name="players1")
        with app.test_client() as client:
            client.get("/register")
            with client.session_transaction() as sess:
                data = {
                    "name": "user",
                    "email": "user@examplectf.com",
                    "password": "password",
                    "bracket_id": 1,
                    "nonce": sess.get("nonce"),
                }
            client.post("/register", data=data)
            client = login_as_user(app, raise_for_error=True)
            r = client.get("/api/v1/brackets?type=users")
            resp = r.get_json()
            print(resp)
            assert r.status_code == 200
            assert resp["data"][0]["name"] == "players1"
            assert resp["data"][0]["description"] == "players who are part of the test"
    destroy_ctfd(app)
Test that brackets API GET endpiont is behaving propertly
tests/api/v1/test_brackets.py