Use addprotocol to that the protocol tests can pass options at instanciation
This commit is contained in:
parent
c4605c4516
commit
08ffc0f71c
@ -217,9 +217,12 @@ class WSTestRoot(WSRoot):
|
||||
|
||||
|
||||
class ProtocolTestCase(unittest.TestCase):
|
||||
protocol_options = {}
|
||||
|
||||
def setUp(self):
|
||||
if self.__class__.__name__ != 'ProtocolTestCase':
|
||||
self.root = WSTestRoot([self.protocol])
|
||||
self.root = WSTestRoot()
|
||||
self.root.addprotocol(self.protocol, **self.protocol_options)
|
||||
|
||||
self.app = TestApp(wsme.wsgi.adapt(self.root))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user