def handler(environ, start_response): path = environ["PATH_INFO"] # If this is an image serving URL, then use use the blob_image WSGI app if re.match(blob_image.BLOBIMAGE_URL_PATTERN, path.lstrip("/")): return blob_image.Application()(environ, start_response) elif re.match(gcs_server.GCS_URL_PATTERN, path.lstrip("/")): return gcs_server.Application()(environ, start_response) return blob_upload.Application(call_internal_upload)(environ, start_response)
def setUp(self): self.mox = mox.Mox() self.app = gcs_server.Application() self.mox.StubOutWithMock(stub_dispatcher, 'dispatch') self._host = 'localhost'