code: def test_execute_custom_templated(
      self, sql_lab_mock, mock_dt
  ) -> None:
      mock_dt.utcnow = mock.Mock(
          return_value=datetime.datetime(1970, 1, 1)
      )
      self.login()
      sql = "SELECT '$DATE()' as test"
      resp = {
          "status": QueryStatus.SUCCESS,
          "query": {"rows": 1},
          "data": [{"test": "'1970-01-01'"}],
      }
      sql_lab_mock.return_value = resp
  
      dbobj = self.create_fake_db_for_macros()
      json_payload = dict(database_id=dbobj.id, sql=sql)
      self.get_json_resp(
          "/api/v1/sqllab/execute/",
          raise_on_error=False,
          json_=json_payload,
      )
      assert sql_lab_mock.called
      self.assertEqual(
          sql_lab_mock.call_args[0][1], "SELECT '1970-01-01' as test"
      )
  
      self.delete_fake_db_for_macros()
  
imports: import datetime
  import json
  import random
  import csv
  import pandas
  import io
  import pytest
  import prison
  from sqlalchemy.sql import func
  from unittest import mock
  from flask_appbuilder.security.sqla.models import Role
  from tests.integration_tests.test_app import app
  from superset import db, sql_lab
  from superset.common.db_query_status import QueryStatus
  from superset.models.core import Database
  from superset.utils.database import get_example_database, get_main_database
  from superset.utils import core
  from superset.models.sql_lab import Query
  from tests.integration_tests.base_tests import SupersetTestCase
  from tests.integration_tests.fixtures.users import create_gamma_sqllab_no_data
label_desc: Use image node_id 10 for calling the TestSqlLabApi obj's underlying member method code with example usage: obj.test_execute_custom_templated(sql_lab_mock, mock_dt) without return types