From 9dde091f2bdc425ecc5e90b3f0ec616758542967 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Sun, 16 Apr 2017 10:56:17 -0400 Subject: [PATCH] test_wormhole.py: remove dead code --- src/wormhole/test/test_wormhole.py | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/wormhole/test/test_wormhole.py b/src/wormhole/test/test_wormhole.py index bf3a87e..daa8a7a 100644 --- a/src/wormhole/test/test_wormhole.py +++ b/src/wormhole/test/test_wormhole.py @@ -1,5 +1,5 @@ from __future__ import print_function, unicode_literals -import json, io, re +import io, re import mock from twisted.trial import unittest from twisted.internet import reactor @@ -12,24 +12,6 @@ from ..errors import (WrongPasswordError, APPID = "appid" -class MockWebSocket: - def __init__(self): - self._payloads = [] - def sendMessage(self, payload, is_binary): - assert not is_binary - self._payloads.append(payload) - - def outbound(self): - out = [] - while self._payloads: - p = self._payloads.pop(0) - out.append(json.loads(p.decode("utf-8"))) - return out - -def response(w, **kwargs): - payload = json.dumps(kwargs).encode("utf-8") - w._ws_dispatch_response(payload) - class Welcome(unittest.TestCase): def test_tolerate_no_current_version(self): w = wormhole._WelcomeHandler("relay_url")