Fix test_command_errors test
Merge pull request #1759 from jamie-cyber1/fix_agent

OOIION-1744 Fix test_command_errors test