Skip to content

Commit

Permalink
make unit tests compatible with Python 3.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Dec 21, 2018
1 parent 19beb96 commit f84a7df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test_socketio.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@socketio.on('connect')
def on_connect():
send('connected')
send(json.dumps(dict(request.args)))
send(json.dumps(request.args.to_dict(flat=False)))
send(json.dumps({h: request.headers[h] for h in request.headers.keys()
if h not in ['Host', 'Content-Type', 'Content-Length']}))

Expand All @@ -32,7 +32,7 @@ def on_disconnect():
@socketio.on('connect', namespace='/test')
def on_connect_test():
send('connected-test')
send(json.dumps(dict(request.args)))
send(json.dumps(request.args.to_dict(flat=False)))
send(json.dumps({h: request.headers[h] for h in request.headers.keys()
if h not in ['Host', 'Content-Type', 'Content-Length']}))

Expand Down Expand Up @@ -195,7 +195,7 @@ def raise_error_default(data):
class MyNamespace(Namespace):
def on_connect(self):
send('connected-ns')
send(json.dumps(dict(request.args)))
send(json.dumps(request.args.to_dict(flat=False)))
send(json.dumps(
{h: request.headers[h] for h in request.headers.keys()
if h not in ['Host', 'Content-Type', 'Content-Length']}))
Expand Down

0 comments on commit f84a7df

Please sign in to comment.