select txaio subsystem in 'base' tests

This commit is contained in:
meejah
2015-12-02 10:53:56 -07:00
parent 09250eedbc
commit e2a3d7b388

View File

@@ -25,6 +25,16 @@
###############################################################################
from __future__ import absolute_import
import os
# we need to select a txaio subsystem because we're importing the base
# protocol classes here for testing purposes. "normally" you'd import
# from autobahn.twisted.wamp or autobahn.asyncio.wamp explicitly.
import txaio
if os.environ.get('USE_TWISTED', False):
txaio.use_twisted()
else:
txaio.use_asyncio()
from autobahn import wamp
from autobahn.wamp import message