~leonardr/lazr.restful/0.9.5.1

« back to all changes in this revision

Viewing changes to src/lazr/restful/testing/webservice.py

  • Committer: Leonard Richardson
  • Date: 2009-08-12 12:29:00 UTC
  • mfrom: (47.1.7 simple-root)
  • Revision ID: leonard.richardson@canonical.com-20090812122900-kcqxbny7rfvmku9d
Create a simplified IServiceRootResource implementation for web services that don't register their top-level collections as Zope utilities.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
from lazr.restful.interfaces import (
34
34
    IWebServiceConfiguration, IWebServiceLayer)
35
35
from lazr.restful.publisher import (
36
 
    SimplePublication, SimpleRequest, WebServicePublicationMixin,
37
 
    WebServiceRequestTraversal)
 
36
    WebServicePublicationMixin, WebServiceRequestTraversal)
 
37
from lazr.restful.simple import Publication, Request
38
38
 
39
39
from lazr.uri import URI
40
40
 
120
120
        print '---'
121
121
 
122
122
 
123
 
class WebServiceTestPublication(SimplePublication):
 
123
class WebServiceTestPublication(Publication):
124
124
    """Test publication that mixes in the necessary web service stuff."""
125
125
 
126
126
    def wrapTraversedObject(self, ob):
138
138
            self.publication = publication(global_config, **options)
139
139
 
140
140
    def request(self, environ):
141
 
        return SimpleRequest(environ['wsgi.input'], environ)
 
141
        return Request(environ['wsgi.input'], environ)
142
142
 
143
143
 
144
144
class WebServiceCaller: