@@ -52,9 +52,6 @@ def pics_TC_LCFG_2_1(self) -> list[str]:
52
52
def has_repeated_values (self , list ):
53
53
return len (list ) != len (set (list ))
54
54
55
- def values_have_maximum_length (self , list , max_lenght ):
56
- return all ((len (elem .encode ('utf-8' )) <= max_lenght ) for elem in list )
57
-
58
55
def supported_locales_has_active_locale (self , list , str ):
59
56
return str in list
60
57
@@ -94,11 +91,12 @@ async def test_TC_LCFG_2_1(self):
94
91
95
92
# Verify maximun number of elements in the SupportedLocales list is 32
96
93
asserts .assert_less_equal (len (initial_supported_locales ), max_length_list ,
97
- "SupportedLocales attribute should have less than " + str ( max_length_list ) + " elements" )
94
+ "SupportedLocales attribute should have less than '{ max_length_list}' elements" )
98
95
99
96
# Verify values of SupportedLocales attribute have a maximum lenght of 35 bytes
100
- asserts .assert_true (self .values_have_maximum_length (initial_supported_locales , max_lenght_string ),
101
- "Values of SupportedLocales attribute should have a maximum lenght of " + str (max_lenght_string ) + " bytes" )
97
+ for elem in initial_supported_locales :
98
+ asserts .assert_less_equal (len (elem .encode ('utf-8' )), max_lenght_string ,
99
+ "Value '{elem}' in SupportedLocales attribute should have a maximum lenght of '{max_lenght_string}' bytes" )
102
100
103
101
# Step 2: TH reads ActiveLocale attribute from the DUT
104
102
self .step (2 )
@@ -117,7 +115,7 @@ async def test_TC_LCFG_2_1(self):
117
115
118
116
# Verify that the value of ActiveLocale attribute has maximum lenght of 35 bytes
119
117
asserts .assert_less_equal (len (initial_active_locale ), max_lenght_string ,
120
- "ActiveLocale attribute should have less than " + str ( max_lenght_string ) + " bytes" )
118
+ "ActiveLocale attribute should have less than '{ max_lenght_string}' bytes" )
121
119
122
120
# Verify that the ActiveLocale attribute value is present in the SupportedLocales attribute list
123
121
asserts .assert_true (self .supported_locales_has_active_locale (initial_supported_locales ,
0 commit comments