def test_call_hook_backward_compatible(capsys): _call_hook(None, None, None, None, _create_cfn_with_hook(), 'pre_hook') out, err = capsys.readouterr() assert out == 'Executing pre hook...\n'
def test_call_hook_not_present(capsys): _call_hook(None, None, None, None, _create_cfn_with_hook(), 'pre_create_hook') out, err = capsys.readouterr() assert out == ''
def test_call_hook_unknown_hook(capsys): _call_hook(None, None, None, None, None, 'unknown_hook') out, err = capsys.readouterr() assert out == 'Unknown hook: unknown_hook\n'