def METHOD_NAME():
    """Only num_users users can be created"""
    app = create_ctfd()
    with app.app_context():
        set_config("num_users", 1)
        register_user(app)
        with app.test_client() as client:
            r = client.get("/register")
            assert r.status_code == 403
            # team should be blocked from creation
            with client.session_transaction() as sess:
                data = {
                    "name": "user",
                    "email": "user@examplectf.com",
                    "password": "password",
                    "nonce": sess.get("nonce"),
                }
            r = client.post("/register", data=data)
            resp = r.get_data(as_text=True)
            # This number is 2 to account for the admin and the registered user
            assert Users.query.count() == 2
            assert "Reached the maximum number of users" in resp
            # Can the team be created after the num has been bumped
            set_config("num_users", 2)
            with client.session_transaction() as sess:
                data = {
                    "name": "user1",
                    "email": "user1@examplectf.com",
                    "password": "password",
                    "nonce": sess.get("nonce"),
                }
            r = client.post("/register", data=data)
            resp = r.get_data(as_text=True)
            assert r.status_code == 302
            assert Users.query.count() == 3
    destroy_ctfd(app)