"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "linotpd/src/linotp/tests/unit/lib/policy/test_condition_comparison.py" between
LinOTP-release-2.12.tar.gz and LinOTP-release-2.12.1.tar.gz

About: LinOTP is a flexible and versatile OTP-platform for strong user authentication (two-factor authentication with one time passwords).

test_condition_comparison.py  (LinOTP-release-2.12):test_condition_comparison.py  (LinOTP-release-2.12.1)
skipping to change at line 180 skipping to change at line 180
# negative test # negative test
'!Emma, ' '!Emma, '
# wildcard realm test # wildcard realm test
'*@realm, ' '*@realm, '
# wildcard name test # wildcard name test
'a*, ' 'a*, '
# negative wildcad name test # negative wildcad name test
'!*z') '!*z')
hugo = User('Hugo', 'realm') hugo = User('Hugo', 'realm')
self.assertTrue( match_type, match = user_list_compare(user_conditions, hugo)
user_list_compare(user_conditions, hugo)) assert match
assert match_type == 'exact:match'
emma = User('Emma') emma = User('Emma')
self.assertFalse( match_type, match = user_list_compare(user_conditions, emma)
user_list_compare(user_conditions, emma)) assert not match
assert match_type == 'not:match'
betonz = User('betonz', 'realm') betonz = User('betonz', 'realm')
self.assertFalse( match_type, match = user_list_compare(user_conditions, betonz)
user_list_compare(user_conditions, betonz)) assert not match
assert match_type == 'not:match'
wanda = User('wanda', 'realm') wanda = User('wanda', 'realm')
self.assertTrue( match_type, match = user_list_compare(user_conditions, wanda)
user_list_compare(user_conditions, wanda)) assert match
assert match_type == 'regex:match'
wanda2 = 'wanda@realm' wanda2 = 'wanda@realm'
self.assertTrue( match_type, match = user_list_compare(user_conditions, wanda2)
user_list_compare(user_conditions, wanda2)) assert match
assert match_type == 'regex:match'
return return
 End of changes. 5 change blocks. 
10 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)