clean up imports
This commit is contained in:
parent
d7ebd02f78
commit
941e4fe18a
|
@ -1,10 +1,16 @@
|
||||||
from __future__ import print_function, unicode_literals
|
from __future__ import print_function, unicode_literals
|
||||||
import base64
|
|
||||||
from binascii import hexlify
|
from binascii import hexlify
|
||||||
from twisted.trial import unittest
|
from twisted.trial import unittest
|
||||||
from twisted.test import proto_helpers
|
from twisted.test import iosim
|
||||||
from twisted.internet.defer import inlineCallbacks
|
from autobahn.twisted.websocket import (
|
||||||
from twisted.internet.task import deferLater
|
WebSocketServerFactory,
|
||||||
|
WebSocketClientFactory,
|
||||||
|
WebSocketClientProtocol,
|
||||||
|
)
|
||||||
|
from autobahn.twisted.testing import (
|
||||||
|
create_pumper,
|
||||||
|
MemoryReactorClockResolver,
|
||||||
|
)
|
||||||
from .common import ServerBase
|
from .common import ServerBase
|
||||||
from ..server_state import (
|
from ..server_state import (
|
||||||
MemoryUsageRecorder,
|
MemoryUsageRecorder,
|
||||||
|
@ -14,15 +20,6 @@ from ..transit_server import (
|
||||||
WebSocketTransitConnection,
|
WebSocketTransitConnection,
|
||||||
)
|
)
|
||||||
|
|
||||||
from ..transit_server import Transit, TransitConnection, WebSocketTransitConnection
|
|
||||||
from twisted.internet.protocol import (
|
|
||||||
ServerFactory,
|
|
||||||
ClientFactory,
|
|
||||||
)
|
|
||||||
from twisted.internet import protocol
|
|
||||||
from ..server_state import create_usage_tracker
|
|
||||||
from autobahn.twisted.websocket import WebSocketServerFactory
|
|
||||||
|
|
||||||
|
|
||||||
def handshake(token, side=None):
|
def handshake(token, side=None):
|
||||||
hs = b"please relay " + hexlify(token)
|
hs = b"please relay " + hexlify(token)
|
||||||
|
@ -478,16 +475,6 @@ class Usage(ServerBase, unittest.TestCase):
|
||||||
self.assertEqual(self._usage.events[2]["mood"], "happy")
|
self.assertEqual(self._usage.events[2]["mood"], "happy")
|
||||||
|
|
||||||
|
|
||||||
from twisted.test import iosim
|
|
||||||
from twisted.internet.testing import MemoryReactorClock
|
|
||||||
from twisted.internet.address import IPv4Address
|
|
||||||
from autobahn.twisted.testing import (
|
|
||||||
create_pumper,
|
|
||||||
create_memory_agent,
|
|
||||||
MemoryReactorClockResolver,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class UsageWebSockets(Usage):
|
class UsageWebSockets(Usage):
|
||||||
"""
|
"""
|
||||||
All the tests of 'Usage' except with a WebSocket (instead of TCP)
|
All the tests of 'Usage' except with a WebSocket (instead of TCP)
|
||||||
|
|
|
@ -2,7 +2,6 @@ from __future__ import print_function, unicode_literals
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
from twisted.python import log
|
from twisted.python import log
|
||||||
from twisted.internet import protocol
|
|
||||||
from twisted.protocols.basic import LineReceiver
|
from twisted.protocols.basic import LineReceiver
|
||||||
from autobahn.twisted.websocket import WebSocketServerProtocol
|
from autobahn.twisted.websocket import WebSocketServerProtocol
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user