

@patch('sys.stdout', new_callable=StringIO)
@patch('sys.stderr', new_callable=StringIO)
def test_build_package(stderr, stdout):
    with HTTMock(packages_mock):
        tool = get_tool('packages')
        server = Server('localhost')
        status = tool.execute(stdout, ['packages', 'build', 'mock_package'])
        eq_(0, status)
        eq_('', stdout.getvalue())
        eq_('', stderr.getvalue())
        (url, request) = get_command_stack()[(- 1)]
        eq_('/crx/packmgr/service/.json/etc/packages/test_packages/mock_package-1.6.5.zip', url.path)
        eq_('cmd=build', request.body)

dataset/ETHPy150Open bjorns/aem-cmd/tests/tools/test_packages.py test_build_package/VarMisuse@60/84 `server`->`stdout`