

@patch('sys.stdout', new_callable=StringIO)
@patch('sys.stderr', new_callable=StringIO)
def test_install_package(stderr, stdout):
    with HTTMock(packages_mock):
        tool = packages.PackagesTool()
        server = Server('localhost')
        status = tool.execute(server, ['packages', 'install', 'mock_package'])
        eq_(0, status)
        eq_('Package Installed\n', stdout.getvalue())
        eq_('', stderr.getvalue())

dataset/ETHPy150Open bjorns/aem-cmd/tests/tools/test_packages.py test_install_package/original