docstr: Test expected location URI and mapping with DataSync.Client methods.
docstr_tok: ["Test","expected","location","URI","and","mapping","with","DataSync.Client","methods","."]
code: def test_create_location_method_mapping(
      self, mock_get_conn, location_uri, expected_method
  ):
      """Test expected location URI and mapping with DataSync.Client methods."""
      mock_get_conn.return_value = self.client
      assert hasattr(
          self.client, expected_method
      ), f"{self.client} doesn't have method {expected_method}"
      with mock.patch.object(self.client, expected_method) as m:
          self.hook.create_location(location_uri, foo="bar", spam="egg")
          m.assert_called_once_with(foo="bar", spam="egg")
  
imports: from __future__ import annotations
  from unittest import mock
  import boto3
  import pytest
  from moto import mock_datasync
  from airflow.exceptions import AirflowException, AirflowTaskTimeout
  from airflow.providers.amazon.aws.hooks.datasync import DataSyncHook
label_desc: Use image node_id 4 for calling the TestDataSyncHookMocked obj's underlying member method code with example usage: obj.test_create_location_method_mapping(mock_get_conn, location_uri, expected_method) without return types