def test_identifier_without_forged_userid(self): environ = {} p = AuthenticationForgerPlugin() identity = p.identify(environ) self.assertEqual(identity, None)
def test_identifier_with_forged_userid(self): environ = {'REMOTE_USER': '******'} p = AuthenticationForgerPlugin() identity = p.identify(environ) self.assertEqual(identity, {'fake-userid': 'gustavo'})