Ejemplo n.º 1
0
def test_subcommand_success():
    """Make sure shiva finds and delegates to a Deployment instance method and
    extracts the result, when all goes well.

    """
    status, output = inner_main([src(__file__),
                                 '--shiva-subcommand',
                                 'get_lock_name'])
    eq_(wake_pickle(output), 'harvey')
    eq_(status, 0)
Ejemplo n.º 2
0
def test_subcommand_should_not_deploy():
    """If a shiva subcommand raises ShouldNotDeploy, it should get pickled and
    printed.

    """
    status, output = inner_main([src(__file__),
                                 '--shiva-subcommand',
                                 'check_out'])
    assert_raises(ShouldNotDeploy, wake_pickle, output)
    eq_(status, 0)