66from json import load , loads
77from pathlib import Path
88from re import escape
9- from unittest .mock import DEFAULT , MagicMock , Mock , call , patch
9+ from unittest .mock import DEFAULT , Mock , call , patch
1010
1111import pytest
1212from pydantic .v1 import ValidationError
@@ -138,30 +138,6 @@ def client():
138138 return AtlanClient ()
139139
140140
141- @pytest .fixture ()
142- def current_client (client , monkeypatch ):
143- monkeypatch .setattr (
144- AtlanClient ,
145- "get_current_client" ,
146- lambda : client ,
147- )
148-
149-
150- @pytest .fixture ()
151- def mock_cm_cache (current_client , monkeypatch ):
152- mock_cache = MagicMock ()
153- mock_cache .get_name_for_id .return_value = CM_NAME
154- monkeypatch .setattr (AtlanClient , "custom_metadata_cache" , mock_cache )
155- return mock_cache
156-
157-
158- @pytest .fixture ()
159- def mock_role_cache (current_client , monkeypatch ):
160- mock_cache = MagicMock ()
161- monkeypatch .setattr (AtlanClient , "role_cache" , mock_cache )
162- return mock_cache
163-
164-
165141@pytest .fixture
166142def group_client (mock_api_caller ):
167143 return GroupClient (client = mock_api_caller )
@@ -1878,7 +1854,6 @@ def test_asset_retrieve_minimal_without_asset_type(
18781854
18791855
18801856def test_user_create (
1881- current_client ,
18821857 mock_api_caller ,
18831858 mock_role_cache ,
18841859):
@@ -1901,9 +1876,7 @@ def test_user_create(
19011876 mock_api_caller .reset_mock ()
19021877
19031878
1904- def test_user_create_with_info (
1905- current_client , mock_api_caller , mock_role_cache , user_list_json
1906- ):
1879+ def test_user_create_with_info (mock_api_caller , mock_role_cache , user_list_json ):
19071880 test_role_id = "role-guid-123"
19081881 client = UserClient (mock_api_caller )
19091882 mock_api_caller ._call_api .side_effect = [
@@ -2724,7 +2697,7 @@ def test_get_all_sorting(group_client, mock_api_caller):
27242697 mock_api_caller .reset_mock ()
27252698
27262699
2727- def test_get_by_guid_asset_not_found_fluent_search (current_client ):
2700+ def test_get_by_guid_asset_not_found_fluent_search ():
27282701 guid = "123"
27292702 asset_type = Table
27302703
@@ -2745,9 +2718,7 @@ def test_get_by_guid_asset_not_found_fluent_search(current_client):
27452718 mock_execute .assert_called_once ()
27462719
27472720
2748- def test_get_by_guid_type_mismatch_fluent_search (
2749- current_client : AtlanClient , mock_api_caller
2750- ):
2721+ def test_get_by_guid_type_mismatch_fluent_search (mock_api_caller ):
27512722 guid = "123"
27522723 expected_asset_type = Table
27532724 returned_asset_type = View
@@ -2772,9 +2743,7 @@ def test_get_by_guid_type_mismatch_fluent_search(
27722743 mock_execute .assert_called_once ()
27732744
27742745
2775- def test_get_by_qualified_name_type_mismatch (
2776- current_client : AtlanClient , mock_api_caller
2777- ):
2746+ def test_get_by_qualified_name_type_mismatch (mock_api_caller ):
27782747 qualified_name = "example_qualified_name"
27792748 expected_asset_type = Table
27802749 returned_asset_type = View
@@ -2798,9 +2767,7 @@ def test_get_by_qualified_name_type_mismatch(
27982767 mock_execute .assert_called_once ()
27992768
28002769
2801- def test_get_by_qualified_name_asset_not_found (
2802- current_client : AtlanClient , mock_api_caller
2803- ):
2770+ def test_get_by_qualified_name_asset_not_found (mock_api_caller ):
28042771 qualified_name = "example_qualified_name"
28052772 asset_type = Table
28062773
0 commit comments