예제 #1
0
def test_run_cmd_invalid_command():
    tool = WinOSClient(host='')
    response = tool.run_cmd_local('whoamia')
    assert not response.ok, 'Response is OK. Must be False'
    assert not response.stdout, 'STDOUT is not empty. Must be empty'

    if os.name == 'nt':
        assert 'is not recognized as an internal' in response.stderr, \
            'Response is OK. Must be False'
    else:
        assert 'whoamia: not found' in response.stderr
예제 #2
0
def test_run_cmd_local(command):
    tool = WinOSClient(host='')
    response = tool.run_cmd_local(command=command)
    assert response.ok, 'Response is not OK'