def set_authentication_result(self, result): if result is None: Session.__dict__['_Session__shared_state']\ ['_Session__authentication_instance'] = None else: mock_auth = mock.create_autospec(BluebirdAuthentication) mock_auth.authenticate.return_value = result Session.set_authentication_instance(mock_auth)
#!/usr/bin/python # -*- coding: utf-8 -*- # # Author Jan Löser <*****@*****.**> # Published under the GNU Public Licence 2 NAME = 'libvirt' import os TEMPLATES = os.path.dirname(__file__) + '/templates' from rflibvirt.views import module from rflibvirt.authentication import * from bluebird.server.sessions.models import Session Session.set_authentication_instance(LocalUser())
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author Jan Löser <*****@*****.**> # Published under the GNU Public Licence 2 NAME = "libvirt" import os TEMPLATES = os.path.dirname(__file__) + "/templates" from rflibvirt.views import module from rflibvirt.authentication import * from bluebird.server.sessions.models import Session Session.set_authentication_instance(LocalUser())