def soap_dispatcher(service, **dispatcher_kwargs): djdispatcher = django_dispatcher(service, **dispatcher_kwargs) def run(request, **kwargs): check_ip(request) return djdispatcher(request, **kwargs) return csrf_exempt(run)
def setUp(self): # noqa # XXX: Python 2.6 and unittest2 still call this method for skipped class. if django is None: self.skipTest('Django is not installed.') self.service = echo_service() settings.ROOT_URLCONF = urlconf(urlpatterns=(url(r'^ws/$', django_dispatcher(self.service)),)) self.client = Client()
def setUp(self): # noqa # XXX: Python 2.6 and unittest2 still call this method for skipped class. if django is None: self.skipTest('Django is not installed.') self.service = echo_service() settings.ROOT_URLCONF = urlconf( urlpatterns=(url(r'^ws/$', django_dispatcher(self.service)), )) self.client = Client()
def setUp(self): if django is None: raise SkipTest('django not installed') super(DjangoDispatchTest, self).setUp() self.service = echo_service() if django.conf.settings.__dict__['_wrapped'] is empty: django.conf.settings.configure(self.django_settings()) django.conf.settings.update( AttrDict(ROOT_URLCONF=AttrDict(urlpatterns=patterns( '', (r"^ws/$", django_dispatcher(self.service))), ), )) self.client = Client()
def setUp(self): if django is None: raise SkipTest('django not installed') super(DjangoDispatchTest, self).setUp() self.service = echo_service() if django.conf.settings.__dict__['_wrapped'] is empty: django.conf.settings.configure(self.django_settings()) django.conf.settings.update(AttrDict( ROOT_URLCONF=AttrDict( urlpatterns = patterns('', (r"^ws/$", django_dispatcher(self.service))), ), )) self.client = Client()
# Create your views here. from django.views.decorators.csrf import csrf_exempt from gen import SERVICE, SERVICE11, SERVICE12 from soapfish.django_ import django_dispatcher dispatch11 = csrf_exempt(django_dispatcher(SERVICE11)) dispatch12 = csrf_exempt(django_dispatcher(SERVICE12)) ops_dispatch = csrf_exempt(django_dispatcher(SERVICE))
def setUp(self): # noqa self.service = echo_service() settings.ROOT_URLCONF = urlconf(urlpatterns=(path('ws/', django_dispatcher(self.service)),)) self.client = Client()
from django.urls import include, path, re_path from soapfish.django_ import django_dispatcher from . soaps import UserRegistrySoapService # from . user_registry_service import UserRegistrySoapPort_SERVICE # from . UserRegistryService import UserRegistrySoapPort_SERVICE dispatcher = django_dispatcher(UserRegistrySoapService) app_name = "esse3_unireg" urlpatterns = path(r'user_registry', dispatcher, name='user_registry'),
def setUp(self): # noqa self.service = echo_service() settings.ROOT_URLCONF = urlconf(urlpatterns=(url(r'^ws/$', django_dispatcher(self.service)),)) self.client = Client()