예제 #1
0
def test_get_unknown_key(store, capsys):
    """Check that getting an unknown display a nice message."""

    shell = CofrShell(store=store)
    shell.do_get('acteur')
    captured = capsys.readouterr()

    assert 'There is no such key' in captured.out
예제 #2
0
def test_get_existing_key(store, capsys):
    """Check that it's possible to view an existing key."""

    shell = CofrShell(store=store)
    shell.do_get('plat')
    captured = capsys.readouterr()

    assert 'tartiflette' in captured.out