Debian Codegraph @

cas_server/tests/auth.py

raw
1 # -*- coding: utf-8 -*-
2 # This program is distributed in the hope that it will be useful, but WITHOUT
3 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
4 # FOR A PARTICULAR PURPOSE. See the GNU General Public License version 3 for
5 # more details.
6 #
7 # You should have received a copy of the GNU General Public License version 3
8 # along with this program; if not, write to the Free Software Foundation, Inc., 51
9 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
10 #
11 # (c) 2016 Valentin Samir
12 """Some test authentication classes for the CAS"""
13 from cas_server import auth
14
15
16 class TestCachedAttributesAuthUser(auth.TestAuthUser):
17 """
18 A test authentication class only working for one unique user.
19
20 :param unicode username: A username, stored in the :attr:`username<AuthUser.username>`
21 class attribute. The uniq valid value is ``settings.CAS_TEST_USER``.
22 """
23 def attributs(self):
24 """
25 The user attributes.
26
27 :raises NotImplementedError: as this class do not support fetching user attributes
28 """
29 raise NotImplementedError()