[sagenb] 113/179: fix doctest in user_manager.py

felix salfelder felix-guest at moszumanska.debian.org
Tue May 6 12:05:15 UTC 2014


This is an automated email from the git hooks/post-receive script.

felix-guest pushed a commit to branch master
in repository sagenb.

commit 2275b0dc09132362f827940577e19b54aa1c5efe
Author: P Purkayastha <ppurka at gmail.com>
Date:   Fri May 3 14:00:25 2013 +0800

    fix doctest in user_manager.py
---
 sagenb/notebook/user_manager.py | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/sagenb/notebook/user_manager.py b/sagenb/notebook/user_manager.py
index 1ba94bd..381ad36 100644
--- a/sagenb/notebook/user_manager.py
+++ b/sagenb/notebook/user_manager.py
@@ -83,18 +83,20 @@ class UserManager(object):
         Otherwise, the underscore _user method is tried.  This is the method that subclasses
         should override to provide custom user functionality.
 
-        EXAMPLES:
+        EXAMPLES::
+
             sage: from sagenb.notebook.user_manager import SimpleUserManager
             sage: U = SimpleUserManager()
             sage: U.create_default_users('password')
             sage: U.user('pub')
             pub
 
-        TESTS:
+        TESTS::
+
             sage: U.user('william')
             Traceback (most recent call last):
             ...
-            LookupError: "no user 'william'"
+            LookupError: no user 'william'
 
             sage: U.user('hello/')
             Traceback (most recent call last):
@@ -570,11 +572,8 @@ class OpenIDUserManager(ExtAuthUserManager):
             sage: UM.create_default_users('passpass')
             sage: UM.create_new_openid('https://www.google.com/accounts/o8/id?id=AItdaWgzjV1HJTa552549o1csTDdfeH6_bPxF14', 'thedude')
             sage: UM.get_username_from_openid('https://www.google.com/accounts/o8/id?id=AItdaWgzjV1HJTa552549o1csTDdfeH6_bPxF14')
-            'thedude' 
+            'thedude'
         """
-        if not self._conf['openid']:
-            raise RuntimeError
-
         try:
             return self._openid[identity_url]
         except KeyError:
@@ -591,14 +590,10 @@ class OpenIDUserManager(ExtAuthUserManager):
             sage: UM.get_username_from_openid('https://www.google.com/accounts/o8/id?id=AItdaWgzjV1HJTa552549o1csTDdfeH6_bPxF14')
             'thedude'
         """
-        if not self._conf['openid']:
-            raise RuntimeError
         self._openid[identity_url] = username
 
     def get_user_from_openid(self, identity_url):
         """
         Return the user object corresponding ot a given identity_url
         """
-        if not self._conf['openid']:
-            raise RuntimeError
         return self.user(self.get_username_from_openid(identity_url)) 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagenb.git



More information about the debian-science-commits mailing list