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'])
Example #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'])
Example #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'])
Example #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))
Example #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))