- use six.text_type instead of unicode for assertion;
- use dict.items() instead of dict.iteritems() for dict iteration;
- use six.text_type to capture exception messages, the 'message' attribute
is no longer existing;
- dict.keys() returns a dict_keys object under Python3 which cannot be
reversed, explicitly convert it to a list.
Partial-Bug: #1755413
Change-Id: I5d31397b7bfe08b504ee5b9cd4ff894031f66c2b
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>