@@ -1031,9 +1031,9 @@ def test_get_business_attributes_when_name_not_valid_raises_value_error(
10311031):
10321032 mock_client .return_value .get_typedefs .return_value = type_def_response
10331033 with pytest .raises (
1034- ValueError , match = "No business attributes with the name: Zoro exist"
1034+ ValueError , match = "No custom metadata with the name: Zoro exist"
10351035 ):
1036- table .get_business_attributes ("Zoro" )
1036+ table .get_custom_metadata ("Zoro" )
10371037
10381038
10391039@patch ("pyatlan.cache.custom_metadata_cache.AtlanClient" )
@@ -1043,9 +1043,9 @@ def test_get_business_attributes_when_name_not_appropriate_for_asset_raises_valu
10431043 mock_client .get_default_client .return_value = mock_client
10441044 mock_client .get_typedefs .return_value = type_def_response
10451045 with pytest .raises (
1046- ValueError , match = "Business attributes Moon are not applicable to Table"
1046+ ValueError , match = "Custom metadata attributes Moon are not applicable to Table"
10471047 ):
1048- table .get_business_attributes ("Moon" )
1048+ table .get_custom_metadata ("Moon" )
10491049
10501050
10511051@patch ("pyatlan.cache.custom_metadata_cache.AtlanClient" )
@@ -1054,7 +1054,7 @@ def test_get_business_attributes_with_valid_name_returns_empty_attribute_when_ta
10541054):
10551055 mock_client .return_value .get_typedefs .return_value = type_def_response
10561056
1057- monte_carlo = table .get_business_attributes ("Monte Carlo" )
1057+ monte_carlo = table .get_custom_metadata ("Monte Carlo" )
10581058
10591059 assert monte_carlo is not None
10601060 assert monte_carlo .freshness is None
@@ -1074,7 +1074,7 @@ def test_get_business_attributes_with_valid_name_returns_attribute_when_table_ha
10741074 }
10751075 }
10761076
1077- monte_carlo = table .get_business_attributes ("Monte Carlo" )
1077+ monte_carlo = table .get_custom_metadata ("Monte Carlo" )
10781078
10791079 assert monte_carlo is not None
10801080 assert monte_carlo .freshness == "pass"
@@ -1086,9 +1086,9 @@ def test_set_busines_attributes_with_non_business_attributes_object_raises_value
10861086):
10871087 with pytest .raises (
10881088 ValueError ,
1089- match = "business_attributes must be an instance of BusinessAttributes " ,
1089+ match = "business_attributes must be an instance of CustomMetadata " ,
10901090 ):
1091- table .set_business_attribute ({})
1091+ table .set_custom_metadata ({})
10921092
10931093
10941094def test_set_business_attributes_with_non_appropriate_meta_data_type_name_raises_value_error (
@@ -1097,9 +1097,9 @@ def test_set_business_attributes_with_non_appropriate_meta_data_type_name_raises
10971097
10981098 with pytest .raises (
10991099 ValueError ,
1100- match = "business_attributes must be an instance of BusinessAttributes " ,
1100+ match = "business_attributes must be an instance of CustomMetadata " ,
11011101 ):
1102- table .set_business_attribute ({})
1102+ table .set_custom_metadata ({})
11031103
11041104
11051105@patch ("pyatlan.cache.custom_metadata_cache.AtlanClient" )
@@ -1113,7 +1113,7 @@ def test_assigning_to_invalid_business_attribute_raises_attribute_error(
11131113 TABLE_URL : "https://getmontecarlo.com/catalog/" ,
11141114 }
11151115 }
1116- business_attributes = table .get_business_attributes ("Monte Carlo" )
1116+ business_attributes = table .get_custom_metadata ("Monte Carlo" )
11171117 with pytest .raises (AttributeError , match = "Attribute bogus does not exist" ):
11181118 business_attributes .bogus = "123"
11191119
@@ -1130,7 +1130,7 @@ def test_set_business_attributes_with_business_attribute_not_appropriate_to_asse
11301130 ValueError ,
11311131 match = "Business attributes Moon are not applicable to Table" ,
11321132 ):
1133- table .set_business_attribute (moon )
1133+ table .set_custom_metadata (moon )
11341134
11351135
11361136@patch ("pyatlan.cache.custom_metadata_cache.AtlanClient" )
@@ -1145,11 +1145,11 @@ def test_set_business_attributes_with_appropriate_business_attribute_updates_dic
11451145 TABLE_URL : "https://getmontecarlo.com/catalog/" ,
11461146 }
11471147 }
1148- monte_carlo = table .get_business_attributes ("Monte Carlo" )
1148+ monte_carlo = table .get_custom_metadata ("Monte Carlo" )
11491149
11501150 monte_carlo .freshness = "fail"
11511151 monte_carlo .table_url = "http://anywhere.com"
1152- table .set_business_attribute (monte_carlo )
1152+ table .set_custom_metadata (monte_carlo )
11531153
11541154 monte_carlo_dict = table .business_attributes [MONTE_CARLO ]
11551155 assert monte_carlo_dict [FRESHNESS ] == monte_carlo .freshness
0 commit comments