def get_id(self):
return self.id
+ def is_authenticated(self):
+ return True
+
def claim_printer(self, claim_code):
"""Claiming can happen before the printer "calls home" for the first
time so we need to be able to deal with that."""
return app
def test_oauth_authorized(self):
+ self.assertEqual(login.current_user.is_authenticated(), False)
twitter.process_authorization(
'token',
'secret_token',
'/next_url',
)
self.assertEqual(login.current_user.username, 'test_screen_name')
+ self.assertEqual(login.current_user.is_authenticated(), True)