code: def test_init(self):
      ec2_hook = EC2Hook(
          aws_conn_id="aws_conn_test",
          region_name="region-test",
      )
      # We're mocking all actual AWS calls and don't need a connection. This
      # avoids an Airflow warning about connection cannot be found.
      ec2_hook.get_connection = lambda _: None
      assert ec2_hook.aws_conn_id == "aws_conn_test"
      assert ec2_hook.region_name == "region-test"
  
imports: from __future__ import annotations
  import pytest
  from moto import mock_ec2
  from airflow.exceptions import AirflowException
  from airflow.providers.amazon.aws.hooks.ec2 import EC2Hook
label_desc: Use image node_id 1 for calling the TestEC2Hook obj's underlying member method code with example usage: obj.test_init() without return types