Fix shell tests for Python 3.4

Partial-Bug: #1384511

Change-Id: I7485184a84ec850c4cd695118f18b55e298f5124