Make the authtest login plugin provide more info
authorRob Crittenden <rcritten@redhat.com>
Thu, 9 Apr 2015 18:59:41 +0000 (14:59 -0400)
committerSimo Sorce <simo@redhat.com>
Fri, 10 Apr 2015 14:41:22 +0000 (10:41 -0400)
Provide more variables to test for in allow attribute and mapping
testing.

Adds givenname (Test User), surname (the username) and
email (username@example.com).

https://fedorahosted.org/ipsilon/ticket/25

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
ipsilon/login/authtest.py

index d7a49d8..7fc4160 100644 (file)
@@ -32,7 +32,12 @@ class TestAuth(LoginFormBase):
         if username and password:
             if password == 'ipsilon':
                 cherrypy.log("User %s successfully authenticated." % username)
         if username and password:
             if password == 'ipsilon':
                 cherrypy.log("User %s successfully authenticated." % username)
-                testdata = {'fullname': 'Test User %s' % username}
+                testdata = {
+                    'givenname': 'Test User',
+                    'surname': username,
+                    'fullname': 'Test User %s' % username,
+                    'email': '%s@example.com' % username
+                }
                 return self.lm.auth_successful(self.trans,
                                                username, 'password', testdata)
             else:
                 return self.lm.auth_successful(self.trans,
                                                username, 'password', testdata)
             else: