Fix some trivial py3 errors

Change-Id: I72334d2ca82057e591dca4fcfa9ef7ecdd3b6878
Update variable name in test_shell.py

Some variable names cannot reflect its real meaning in unit
test for heat shell, this patch update the variable names to
be more accurate.

Change-Id: Ib9b4770769a20b5e139620ceab0f463a4e035d66
Add to_dict() method to Resource class

Commit a07b8b0b introduces a regression when running 'heat
resource-show' command because heatclient.v1.resources.Resource class
didn't implement the to_dict() method.

This commit adds unit tests for resource show and list commands. It
also removes the use of MagicMock in these tests because it introduced
a recursion issue (see https://review.openstack.org/#/c/65269/).

Change-Id: I6c4c0e293d2955c67a0240136faa2721ef2e4ffa
Closes-Bug: 1266678
Merge "Add to_dict() method to Resource class"
Merge "Update variable name in test_shell.py"
Merge "Fix some trivial py3 errors"
Sync strutils from oslo

Sync strutils from oslo which fix safe_encode under py3, this gets
heat CLI to not output in bytes.

(there is a bit more to be done for complete py3 support)

84d461 Fix a bug in safe_encode where it returns a bytes object in py3

Change-Id: Ic29c0037bfbc612e954045c95edca68f273c4a1a
Merge "Sync strutils from oslo"