aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to '_pytest/conftest.py')
-rw-r--r--_pytest/conftest.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/_pytest/conftest.py b/_pytest/conftest.py
index 1af03c7..043b125 100644
--- a/_pytest/conftest.py
+++ b/_pytest/conftest.py
@@ -6,6 +6,8 @@ import random
import string
import sys
+from websocket import ABNF
+
sys.path.append(".")
import wee_slack
@@ -16,9 +18,11 @@ class fakewebsocket(object):
self.returndata = []
self.sentdata = []
def add(self, data):
- self.returndata.append(data)
+ self.returndata.append(json.dumps(data).encode('utf-8'))
def recv(self):
- return json.dumps(self.returndata.pop(0))
+ return self.recv_data()[1].decode('utf-8')
+ def recv_data(self, control_frame=False):
+ return ABNF.OPCODE_TEXT, self.returndata.pop(0)
def send(self, data):
self.sentdata.append(data)