~damiano-albani/ubuntu-sso-client/proxy-support

« back to all changes in this revision

Viewing changes to ubuntu_sso/tests/test_account.py

  • Committer: Damiano
  • Date: 2011-08-12 15:48:17 UTC
  • Revision ID: damiano@cent-quatre-20110812154817-x9kvr3e0xp4fnobu
Now passes unit tests and complies with syntax requirements.

Show diffs side-by-side

added added

removed removed

Lines of Context:
135
135
class FakedSSOServer(object):
136
136
    """Fake an SSO server."""
137
137
 
138
 
    def __init__(self, authorizer, service_root):
 
138
    def __init__(self, authorizer, service_root, proxy_info):
139
139
        self.captchas = FakedCaptchas()
140
140
        self.registrations = FakedRegistrations()
141
141
        self.authentications = FakedAuthentications()
256
256
 
257
257
    def test_is_not_validated(self):
258
258
        """If preferred email is None, user is not validated."""
259
 
        service = FakedSSOServer(None, None)
 
259
        service = FakedSSOServer(None, None, None)
260
260
        service.accounts.preferred_email = None
261
261
        result = self.processor.is_validated(sso_service=service,
262
262
                                             token=TOKEN)
264
264
 
265
265
    def test_is_not_validated_empty_result(self):
266
266
        """If preferred email is None, user is not validated."""
267
 
        service = FakedSSOServer(None, None)
 
267
        service = FakedSSOServer(None, None, None)
268
268
        service.accounts.me = lambda: {}
269
269
        result = self.processor.is_validated(sso_service=service,
270
270
                                             token=TOKEN)