docstr: This test verifies that if we create conn_1 from attributes (rather than from URI), and we generate a
  URI, that when we create conn_2 from this URI, we get an equivalent conn.
  1. Build conn init params using `test_conn_attributes` and store in `conn_kwargs`
  2. Instantiate conn `connection` from `conn_kwargs`.
  3. Generate uri `get_uri` from this conn.
  4. Create conn `new_conn` from this uri.
  5. Verify `new_conn` has same attributes as `connection`.
code: def test_connection_get_uri_from_conn(
      self, test_config: UriTestCaseConfig
  ):
      """
      This test verifies that if we create conn_1 from attributes (rather than from URI), and we generate a
      URI, that when we create conn_2 from this URI, we get an equivalent conn.
      1. Build conn init params using `test_conn_attributes` and store in `conn_kwargs`
      2. Instantiate conn `connection` from `conn_kwargs`.
      3. Generate uri `get_uri` from this conn.
      4. Create conn `new_conn` from this uri.
      5. Verify `new_conn` has same attributes as `connection`.
      """
      conn_kwargs = {}
      for k, v in test_config.test_conn_attributes.items():
          if k == "extra_dejson":
              conn_kwargs.update({"extra": json.dumps(v)})
          else:
              conn_kwargs.update({k: v})
  
      connection = Connection(conn_id="test_conn", **conn_kwargs)  # type: ignore
      gen_uri = connection.get_uri()
      new_conn = Connection(conn_id="test_conn", uri=gen_uri)
      for (
          conn_attr,
          expected_val,
      ) in test_config.test_conn_attributes.items():
          actual_val = getattr(new_conn, conn_attr)
          if expected_val is None:
              assert actual_val is None
          else:
              assert actual_val == expected_val
  
imports: from __future__ import annotations
  import json
  import os
  import re
  from collections import namedtuple
  from unittest import mock
  import pytest
  import sqlalchemy
  from cryptography.fernet import Fernet
  from airflow.exceptions import AirflowException
  from airflow.hooks.base import BaseHook
  from airflow.models import Connection, crypto
  from airflow.providers.sqlite.hooks.sqlite import SqliteHook
  from airflow.providers_manager import HookInfo
  from tests.test_utils.config import conf_vars
label_desc: Use image node_id 8 for calling the TestConnection obj's underlying member method code with example usage: obj.test_connection_get_uri_from_conn(test_config) without return types