File: test_utils.py

package info (click to toggle)
vdirsyncer 0.14.1-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 848 kB
  • sloc: python: 6,664; makefile: 243; sh: 59
file content (13 lines) | stat: -rw-r--r-- 371 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
from vdirsyncer import exceptions
from vdirsyncer.cli.utils import handle_cli_error


def test_handle_cli_error(capsys):
    try:
        raise exceptions.InvalidResponse('ayy lmao')
    except BaseException:
        handle_cli_error()

    out, err = capsys.readouterr()
    assert 'returned something vdirsyncer doesn\'t understand' in err
    assert 'ayy lmao' in err