Fixed several shell tests on Python3.

They currently fail because on Python3 arbitrary objects cannot be compared, in
this case, MagicMock and int. In Python2 these comparisons silently pass.

Change-Id: I468c2137702a454365886099e827d329cb1d7209
Merge "Fixed several shell tests on Python3."