def test_browse_admin_submissions():
    """Test that an admin can create a challenge properly"""
    app = create_ctfd()
    with app.app_context():
        gen_challenge(db=app.db)
        admin = login_as_user(app, name="admin", password="password")
        r = admin.get(
            "/api/v1/statistics/challenges/category?function=sum&target=value"
        )
        resp = r.get_json()
        assert resp["data"]
        assert r.status_code == 200
    destroy_ctfd(app)
Test that an admin can create a challenge properly
tests/api/v1/statistics/test_scores.py