def test_api_users_post_non_admin():
    """Can a user post /api/v1/users if not admin"""
    app = create_ctfd()
    with app.app_context():
        with app.test_client() as client:
            r = client.post("/api/v1/users", json="")
            assert r.status_code == 403
    destroy_ctfd(app)
Can a user post /api/v1/users if not admin
tests/api/v1/test_users.py