Fix test_command_errors test
Merge pull request #1758 from jamie-cyber1/fix_agent2

OOIION-1744 Fix test_command_errors test