예제 #1
0
 def test_prep_lowercase(self):
     # prep_case_insensitive returns the string with spaces at the front and
     # end and lowercases the value.
     value = 'UPPERCASE VALUE'
     exp_value = value.lower()
     self.assertEqual(exp_value, ks_ldap.prep_case_insensitive(value))
예제 #2
0
 def test_prep_insignificant_pre_post(self):
     # prep_case_insensitive remove insignificant spaces.
     value = '   value   '
     exp_value = 'value'
     self.assertEqual(exp_value, ks_ldap.prep_case_insensitive(value))
예제 #3
0
 def test_prep(self):
     # prep_case_insensitive returns the string with spaces at the front and
     # end if it's already lowercase and no insignificant characters.
     value = 'lowercase value'
     self.assertEqual(value, ks_ldap.prep_case_insensitive(value))
예제 #4
0
 def test_prep_insignificant_pre_post(self):
     # prep_case_insensitive remove insignificant spaces.
     value = '   value   '
     exp_value = 'value'
     self.assertEqual(exp_value, ks_ldap.prep_case_insensitive(value))
예제 #5
0
 def test_prep_lowercase(self):
     # prep_case_insensitive returns the string with spaces at the front and
     # end and lowercases the value.
     value = 'UPPERCASE VALUE'
     exp_value = value.lower()
     self.assertEqual(exp_value, ks_ldap.prep_case_insensitive(value))
예제 #6
0
 def test_prep(self):
     # prep_case_insensitive returns the string with spaces at the front and
     # end if it's already lowercase and no insignificant characters.
     value = 'lowercase value'
     self.assertEqual(value, ks_ldap.prep_case_insensitive(value))
예제 #7
0
 def test_prep_insignificant(self):
     # prep_case_insensitive remove insignificant spaces.
     value = "before   after"
     exp_value = "before after"
     self.assertEqual(exp_value, ks_ldap.prep_case_insensitive(value))