def test_username_translation(self):
     user_class = 'tests.fixture.sa_model:User'
     dbsession = 'tests.fixture.sa_model:DBSession'
     username_translation = 'username'
     authenticator = make_sa_authenticator(user_class, dbsession,
                                           username_translation)
     self.assertTrue(
         isinstance(authenticator, SQLAlchemyAuthenticatorPlugin))
     self.assertEqual(username_translation,
                      authenticator.translations['user_name'])
示例#2
0
 def test_username_translation(self):
     user_class = 'tests.fixture.sa_model:User'
     dbsession = 'tests.fixture.sa_model:DBSession'
     username_translation = 'username'
     authenticator = make_sa_authenticator(user_class, dbsession,
                                           username_translation)
     self.assertTrue(isinstance(authenticator, 
                                SQLAlchemyAuthenticatorPlugin))
     self.assertEqual(username_translation,
                      authenticator.translations['user_name'])
 def test_dummy_validate_translation(self):
     user_class = 'tests.fixture.sa_model:User'
     dbsession = 'tests.fixture.sa_model:DBSession'
     dummy_val_translation = 'tests.fixture.sa_model:dummy_validate'
     authenticator = make_sa_authenticator(
         user_class,
         dbsession,
         dummy_validate_password_translation=dummy_val_translation)
     self.assertTrue(
         isinstance(authenticator, SQLAlchemyAuthenticatorPlugin))
     self.assertEqual(sa_model.dummy_validate,
                      authenticator.translations['dummy_validate_password'])
 def test_passwd_validator_translation(self):
     user_class = 'tests.fixture.sa_model:User'
     dbsession = 'tests.fixture.sa_model:DBSession'
     password_validator_translation = 'verify_pass'
     authenticator = make_sa_authenticator(
         user_class,
         dbsession,
         validate_password_translation=password_validator_translation)
     self.assertTrue(
         isinstance(authenticator, SQLAlchemyAuthenticatorPlugin))
     self.assertEqual(password_validator_translation,
                      authenticator.translations['validate_password'])
示例#5
0
 def test_dummy_validate_translation(self):
     user_class = 'tests.fixture.sa_model:User'
     dbsession = 'tests.fixture.sa_model:DBSession'
     dummy_val_translation = 'tests.fixture.sa_model:dummy_validate'
     authenticator = make_sa_authenticator(
         user_class,
         dbsession,
         dummy_validate_password_translation=dummy_val_translation)
     self.assertTrue(isinstance(authenticator, 
                                SQLAlchemyAuthenticatorPlugin))
     self.assertEqual(sa_model.dummy_validate,
                      authenticator.translations['dummy_validate_password'])
示例#6
0
 def test_passwd_validator_translation(self):
     user_class = 'tests.fixture.sa_model:User'
     dbsession = 'tests.fixture.sa_model:DBSession'
     password_validator_translation = 'verify_pass'
     authenticator = make_sa_authenticator(
         user_class,
         dbsession,
         validate_password_translation=password_validator_translation)
     self.assertTrue(isinstance(authenticator, 
                                SQLAlchemyAuthenticatorPlugin))
     self.assertEqual(password_validator_translation,
                      authenticator.translations['validate_password'])
 def test_simple_call(self):
     user_class = 'tests.fixture.sa_model:User'
     dbsession = 'tests.fixture.sa_model:DBSession'
     authenticator = make_sa_authenticator(user_class, dbsession)
     self.assertTrue(
         isinstance(authenticator, SQLAlchemyAuthenticatorPlugin))
示例#8
0
 def test_simple_call(self):
     user_class = 'tests.fixture.sa_model:User'
     dbsession = 'tests.fixture.sa_model:DBSession'
     authenticator = make_sa_authenticator(user_class, dbsession)
     self.assertTrue(isinstance(authenticator, 
                                SQLAlchemyAuthenticatorPlugin))