Remove the wsgi adapter, it is now a function on WSRoot
This commit is contained in:
parent
752d48955c
commit
55e2227022
@ -92,6 +92,11 @@ class WSRoot(object):
|
|||||||
|
|
||||||
self._api = None
|
self._api = None
|
||||||
|
|
||||||
|
def wsgiapp(self):
|
||||||
|
"""Returns a wsgi"""
|
||||||
|
from webob.dec import wsgify
|
||||||
|
return wsgify(self._handle_request)
|
||||||
|
|
||||||
def begin(self):
|
def begin(self):
|
||||||
if self._transaction:
|
if self._transaction:
|
||||||
return self._transaction.begin()
|
return self._transaction.begin()
|
||||||
|
@ -4,7 +4,6 @@ import unittest
|
|||||||
import warnings
|
import warnings
|
||||||
import datetime
|
import datetime
|
||||||
import decimal
|
import decimal
|
||||||
import base64
|
|
||||||
import sys
|
import sys
|
||||||
import six
|
import six
|
||||||
|
|
||||||
@ -14,7 +13,6 @@ from webtest import TestApp
|
|||||||
|
|
||||||
from wsme import WSRoot, Unset
|
from wsme import WSRoot, Unset
|
||||||
from wsme import expose, validate
|
from wsme import expose, validate
|
||||||
import wsme.wsgi
|
|
||||||
import wsme.types
|
import wsme.types
|
||||||
|
|
||||||
warnings.filterwarnings('ignore', module='webob.dec')
|
warnings.filterwarnings('ignore', module='webob.dec')
|
||||||
@ -303,7 +301,7 @@ class ProtocolTestCase(unittest.TestCase):
|
|||||||
self.root.getapi()
|
self.root.getapi()
|
||||||
self.root.addprotocol(self.protocol, **self.protocol_options)
|
self.root.addprotocol(self.protocol, **self.protocol_options)
|
||||||
|
|
||||||
self.app = TestApp(wsme.wsgi.adapt(self.root))
|
self.app = TestApp(self.root.wsgiapp())
|
||||||
|
|
||||||
def test_invalid_path(self):
|
def test_invalid_path(self):
|
||||||
try:
|
try:
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
from webob.dec import wsgify
|
|
||||||
|
|
||||||
|
|
||||||
def adapt(root):
|
|
||||||
return wsgify(root._handle_request)
|
|
Loading…
x
Reference in New Issue
Block a user