The agent returns command_result of None when a command is in progress.
The code assumed it would return an empty dict. Fix the access of
command_result to never return None, and fix the tests to reflect
reality.
Closes-Bug: #1444715
Change-Id: Iae6cd90517cb7b268ce2c089c92f64b09a606a42