コード例 #1
0
ファイル: test_completion.py プロジェクト: loadx/passpie
def test_script_returns_zsh_script_when_zsh_shell_name(mocker):
    shell_name = "zsh"
    config_path = tempfile.gettempdir()
    commands = ["add", "remove", "update", "remove", "search"]
    text = completion.script(shell_name=shell_name, config_path=config_path, commands=commands)

    for line in completion.ZSH.split("\n")[:3]:
        assert line in text
コード例 #2
0
ファイル: test_completion.py プロジェクト: athrabeth/passpie
def test_script_returns_zsh_script_when_zsh_shell_name(mocker):
    shell_name = 'zsh'
    config_path = '/tmp'
    commands = ['add', 'remove', 'update', 'remove', 'search']
    text = completion.script(shell_name=shell_name,
                             config_path=config_path,
                             commands=commands)

    for line in completion.ZSH.split('\n')[:3]:
        assert line in text
コード例 #3
0
def test_script_returns_bash_script_when_bash_shell_name(mocker):
    shell_name = 'bash'
    config_path = tempfile.gettempdir()
    commands = ['add', 'remove', 'update', 'remove', 'search']
    text = completion.script(shell_name=shell_name,
                             config_path=config_path,
                             commands=commands)

    for line in completion.BASH.split('\n')[:3]:
        assert line in text