コード例 #1
0
ファイル: test_auth.py プロジェクト: rciorba/moin-2.0-mirror
 def test_transform_username(self):
     givenauth_obj = GivenAuth()
     givenauth_obj.strip_maildomain = True
     givenauth_obj.strip_windomain = True
     givenauth_obj.titlecase = True
     givenauth_obj.remove_blanks = True
     result = givenauth_obj.transform_username(u'testDomain\\test [email protected]')
     assert result == 'TestName'
コード例 #2
0
ファイル: test_auth.py プロジェクト: bhrigu123/moin-2.0-beta
 def test_transform_username(self):
     givenauth_obj = GivenAuth()
     givenauth_obj.strip_maildomain = True
     givenauth_obj.strip_windomain = True
     givenauth_obj.titlecase = True
     givenauth_obj.remove_blanks = True
     result = givenauth_obj.transform_username(
         u'testDomain\\test [email protected]')
     assert result == 'TestName'
コード例 #3
0
ファイル: test_auth.py プロジェクト: rciorba/moin-2.0-mirror
 def test_request(self):
     givenauth_obj = GivenAuth()
     flaskg.user.auth_method = 'given'
     givenauth_obj.user_name = u'testDomain\\[email protected]'
     givenauth_obj.strip_maildomain = True
     givenauth_obj.strip_windomain = True
     givenauth_obj.titlecase = True
     givenauth_obj.remove_blanks = True
     create_user(u'Test_User', u'test_pass', u'*****@*****.**')
     test_user, bool_value = givenauth_obj.request(flaskg.user)
     assert test_user.valid
     assert test_user.name == [u'Test_User', ]
コード例 #4
0
ファイル: test_auth.py プロジェクト: bhrigu123/moin-2.0-beta
 def test_request(self):
     givenauth_obj = GivenAuth()
     flaskg.user.auth_method = 'given'
     givenauth_obj.user_name = u'testDomain\\[email protected]'
     givenauth_obj.strip_maildomain = True
     givenauth_obj.strip_windomain = True
     givenauth_obj.titlecase = True
     givenauth_obj.remove_blanks = True
     create_user(u'Test_User', u'test_pass', u'*****@*****.**')
     test_user, bool_value = givenauth_obj.request(flaskg.user)
     assert test_user.valid
     assert test_user.name == [
         u'Test_User',
     ]