Ejemplo n.º 1
0
 def test_unit_set_email__err__external_auth_ldap(self):
     api = UserApi(current_user=None, session=self.session, config=self.app_config)
     u = api.create_user(
         email="bob@bob",
         password=None,
         name="bob",
         auth_type=AuthType.LDAP,
         timezone="+2",
         lang="en",
         do_save=True,
         do_notify=False,
     )
     api._user = u
     with pytest.raises(ExternalAuthUserEmailModificationDisallowed):
         api.set_email(u, "pass", "bob@bobi")
Ejemplo n.º 2
0
 def test_unit_set_email__err__external_auth_ldap(self):
     api = UserApi(
         current_user=None,
         session=self.session,
         config=self.app_config,
     )
     u = api.create_user(
         email='bob@bob',
         password=None,
         name='bob',
         auth_type=AuthType.LDAP,
         timezone='+2',
         lang='en',
         do_save=True,
         do_notify=False,
     )
     api._user = u
     with pytest.raises(ExternalAuthUserEmailModificationDisallowed):
         api.set_email(
             u,
             'pass',
             'bob@bobi',
         )
Ejemplo n.º 3
0
 def test_unit_set_password__err__external_auth_ldap(self):
     api = UserApi(
         current_user=None,
         session=self.session,
         config=self.app_config,
     )
     u = api.create_user(
         email='bob@bob',
         password=None,
         name='bob',
         auth_type=AuthType.LDAP,
         timezone='+2',
         lang='en',
         do_save=True,
         do_notify=False,
     )
     api._user = u
     with pytest.raises(ExternalAuthUserPasswordModificationDisallowed):
         api.set_password(
             u,
             'pass',
             'pass',
             'pass',
         )