Skip to content

Commit

Permalink
Adjusted py3 error tests to account for unicode strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Robert Tester committed Apr 27, 2018
1 parent 8e4604c commit 24063b3
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tests/test_modules/test_web/test_system_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,22 +128,22 @@ def test_error_server_and_simple_client_no_type(self):
)
resp = self.result.get(timeout=2)

#if version_info[0] == 2:
assert resp == dict(
typeid="malcolm:core/Error:1.0",
id=0,
message="FieldError: typeid field not present in dictionary " +
"( d.keys() = [u'path', u'id', u'parameters'] )"
)
#elif version_info[0] == 3:
# assert resp == dict(
# typeid="malcolm:core/Error:1.0",
# id=0,
# message="FieldError: typeid field not present in dictionary " +
# "( d.keys() = odict_keys(['parameters', 'path', 'id']) )"
# )
#else:
# raise Exception("Got bad python version info")
if version_info[0] == 2:
assert resp == dict(
typeid="malcolm:core/Error:1.0",
id=0,
message="FieldError: typeid field not present in dictionary " +
"( d.keys() = [u'path', u'id', u'parameters'] )"
)
elif version_info[0] == 3:
assert resp == dict(
typeid="malcolm:core/Error:1.0",
id=0,
message="FieldError: typeid field not present in dictionary " +
"( d.keys() = ['path', 'id', 'parameters'] )"
)
else:
raise Exception("Got bad python version info")

def test_error_server_and_simple_client_bad_path_controller(self):
self.server._loop.add_callback(self.send_message,
Expand Down

0 comments on commit 24063b3

Please sign in to comment.