code: def test_show_csv():
      import dtale
  
      csv_path = os.path.join(
          os.path.dirname(__file__), "..", "data/test_df.csv"
      )
  
      mock_show = mock.Mock()
      with mock.patch("dtale.cli.loaders.csv_loader.show", mock_show):
          dtale.show_csv(path=csv_path)
          mock_show.call_args[1]["data_loader"]()
          mock_show.reset_mock()
  
      with open(csv_path, "r") as f:
          csv_txt = f.read()
          with ExitStack() as stack:
              stack.enter_context(
                  mock.patch(
                      "dtale.cli.loaders.csv_loader.show", mock_show
                  )
              )
  
              class MockRequest(object):
                  def __init__(self):
                      self.content = (
                          csv_txt.encode() if PY3 else csv_txt
                      )
                      self.status_code = 200
  
              stack.enter_context(
                  mock.patch(
                      "requests.get",
                      mock.Mock(return_value=MockRequest()),
                  )
              )
              dtale.show_csv(path="http://test-csv")
              mock_show.call_args[1]["data_loader"]()
              mock_show.reset_mock()
              dtale.show_csv(
                  path="http://test-csv", proxy="http://test-proxy"
              )
              mock_show.call_args[1]["data_loader"]()
              mock_show.reset_mock()
  
file_path: dtale/tests/dtale/test_show_loaders.py
imports: import json
  import os
  import pandas
  import mock
  import pytest
  from six import PY3
  from dtale.pandas_util import check_pandas_version
  from tests import ExitStack
label_desc: Use image node_id 1 for calling a global function with example usage: test_show_csv() without return types