code: def test_action_export(admin_client, variable):
      resp = admin_client.post(
          "/variable/action_post",
          data={"action": "varexport", "rowid": [variable.id]},
      )
      assert resp.status_code == 200
      assert (
          resp.headers["Content-Type"]
          == "application/json; charset=utf-8"
      )
      assert (
          resp.headers["Content-Disposition"]
          == "attachment; filename=variables.json"
      )
      assert resp.json == {"test_key": "text_val"}
  
imports: from __future__ import annotations
  from io import BytesIO
  from unittest import mock
  import pytest
  from airflow.models import Variable
  from airflow.security import permissions
  from airflow.utils.session import create_session
  from tests.test_utils.api_connexion_utils import create_user
  from tests.test_utils.www import _check_last_log, check_content_in_response, check_content_not_in_response, client_with_login
label_desc: Use image node_id 18 for calling a global function with example usage: test_action_export(admin_client, variable) without return types