Fix command test.

Make command test work with python3.
Make command test work with depedencies.