diff options
| author | liris <liris.pp@gmail.com> | 2014-10-15 14:53:29 +0900 |
|---|---|---|
| committer | liris <liris.pp@gmail.com> | 2014-10-15 14:53:29 +0900 |
| commit | 158663b84f4e98ba19a81845ba0398e3d2a87c2b (patch) | |
| tree | f24bb2daf63c13775e5c2b7b9c31c25e1c6ba5cc /compliance | |
| parent | b6e7f714746ce1cfb63529b91f60701442276dec (diff) | |
| download | websocket-client-158663b84f4e98ba19a81845ba0398e3d2a87c2b.tar.gz | |
refs #117 - improve close frame.
Diffstat (limited to 'compliance')
| -rw-r--r-- | compliance/test_fuzzingclient.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compliance/test_fuzzingclient.py b/compliance/test_fuzzingclient.py index 63fc326..3dfd10c 100644 --- a/compliance/test_fuzzingclient.py +++ b/compliance/test_fuzzingclient.py @@ -22,6 +22,7 @@ failed = 0 for case in range(1, count+1): url = SERVER + '/runCase?case={}&agent={}'.format(case, AGENT) + status = websocket.STATUS_NORMAL try: ws = websocket.create_connection(url) opcode, msg = ws.recv_data() @@ -33,12 +34,13 @@ for case in range(1, count+1): except UnicodeDecodeError: # this case is ok. success += 1 + status = websocket.STATUS_PROTOCOL_ERROR except Exception as e: failed += 1 - # print("[Faield] Test Case: " + str(case)) - #print(traceback.format_exc()) + status = websocket.STATUS_PROTOCOL_ERROR + print(traceback.format_exc()) finally: - ws.close() + ws.close(status) print("Ran {} test cases. success: {}, faield: {}".format(case, success, failed)) url = SERVER + '/updateReports?agent={}'.format(AGENT) |
