コード例 #1
0
def test_make_check_flags_with_archives_check_and_prefix_includes_prefix_flag(
):
    flags = module._make_check_flags(('archives', ), prefix='foo-')

    assert flags == ('--archives-only', '--prefix', 'foo-')
コード例 #2
0
def test_make_check_flags_with_data_check_returns_flag():
    flags = module._make_check_flags(('data',))

    assert flags == ('--verify-data',)
コード例 #3
0
def test_make_check_flags_with_all_checks_returns_default_flags():
    flags = module._make_check_flags(module.DEFAULT_CHECKS + ('extract', ))

    assert flags == ('--prefix', module.DEFAULT_PREFIX)
コード例 #4
0
def test_make_check_flags_with_repository_check_and_last_omits_last_flag():
    flags = module._make_check_flags(('repository', ), check_last=3)

    assert flags == ('--repository-only', )
コード例 #5
0
def test_make_check_flags_with_default_checks_and_last_returns_last_flag():
    flags = module._make_check_flags(module.DEFAULT_CHECKS, check_last=3)

    assert flags == ('--last', '3')
コード例 #6
0
def test_make_check_flags_with_repository_check_returns_flag():
    flags = module._make_check_flags(('repository', ))

    assert flags == ('--repository-only', )
コード例 #7
0
ファイル: test_check.py プロジェクト: witten/borgmatic
def test_make_check_flags_with_repository_check_and_prefix_omits_prefix_flag():
    flags = module._make_check_flags(('repository',), prefix='foo-')

    assert flags == ('--repository-only',)
コード例 #8
0
def test_make_check_flags_with_all_checks_returns_no_flags():
    flags = module._make_check_flags(module.DEFAULT_CHECKS + ('extract', ))

    assert flags == ()
コード例 #9
0
ファイル: test_check.py プロジェクト: witten/borgmatic
def test_make_check_flags_with_default_checks_and_last_includes_last_flag():
    flags = module._make_check_flags(module.DEFAULT_CHECKS, check_last=3)

    assert flags == ('--last', '3', '--prefix', module.DEFAULT_PREFIX)
コード例 #10
0
ファイル: test_check.py プロジェクト: witten/borgmatic
def test_make_check_flags_with_archives_check_and_prefix_includes_prefix_flag():
    flags = module._make_check_flags(('archives',), prefix='foo-')

    assert flags == ('--archives-only', '--prefix', 'foo-')
コード例 #11
0
ファイル: test_check.py プロジェクト: witten/borgmatic
def test_make_check_flags_with_repository_check_and_last_omits_last_flag():
    flags = module._make_check_flags(('repository',), check_last=3)

    assert flags == ('--repository-only',)
コード例 #12
0
ファイル: test_check.py プロジェクト: witten/borgmatic
def test_make_check_flags_with_archives_check_and_last_includes_last_flag():
    flags = module._make_check_flags(('archives',), check_last=3)

    assert flags == ('--archives-only', '--last', '3', '--prefix', module.DEFAULT_PREFIX)
コード例 #13
0
ファイル: test_check.py プロジェクト: witten/borgmatic
def test_make_check_flags_with_all_checks_returns_default_flags():
    flags = module._make_check_flags(module.DEFAULT_CHECKS + ('extract',))

    assert flags == ('--prefix', module.DEFAULT_PREFIX)
コード例 #14
0
ファイル: test_check.py プロジェクト: karlfiabeschi/borgmatic
def test_make_check_flags_with_archives_check_and_empty_prefix_omits_prefix_flag(
):
    flags = module._make_check_flags(('archives', ), prefix='')

    assert flags == ('--archives-only', )
コード例 #15
0
ファイル: test_check.py プロジェクト: witten/borgmatic
def test_make_check_flags_with_default_checks_and_prefix_includes_prefix_flag():
    flags = module._make_check_flags(module.DEFAULT_CHECKS, prefix='foo-')

    assert flags == ('--prefix', 'foo-')
コード例 #16
0
def test_make_check_flags_with_default_checks_returns_no_flags():
    flags = module._make_check_flags(module.DEFAULT_CHECKS)

    assert flags == ()
コード例 #17
0
ファイル: test_check.py プロジェクト: DanielDent/borgmatic
def test_make_check_flags_with_checks_returns_flags():
    flags = module._make_check_flags(('repository',))

    assert flags == ('--repository-only',)
コード例 #18
0
def test_make_check_flags_with_checks_and_last_returns_flags_including_last():
    flags = module._make_check_flags(('repository', ), check_last=3)

    assert flags == ('--repository-only', '--last', '3')
コード例 #19
0
ファイル: test_check.py プロジェクト: DanielDent/borgmatic
def test_make_check_flags_with_extract_check_does_not_make_extract_flag():
    flags = module._make_check_flags(('extract',))

    assert flags == ()
コード例 #20
0
def test_make_check_flags_with_default_checks_and_prefix_includes_prefix_flag(
):
    flags = module._make_check_flags(module.DEFAULT_CHECKS, prefix='foo-')

    assert flags == ('--prefix', 'foo-')
コード例 #21
0
ファイル: test_check.py プロジェクト: DanielDent/borgmatic
def test_make_check_flags_with_default_checks_returns_no_flags():
    flags = module._make_check_flags(module.DEFAULT_CHECKS)

    assert flags == ()
コード例 #22
0
def test_make_check_flags_with_extract_omits_extract_flag():
    flags = module._make_check_flags(('extract', ))

    assert flags == ()
コード例 #23
0
ファイル: test_check.py プロジェクト: DanielDent/borgmatic
def test_make_check_flags_with_checks_and_last_returns_flags_including_last():
    flags = module._make_check_flags(('repository',), check_last=3)

    assert flags == ('--repository-only', '--last', '3')
コード例 #24
0
def test_make_check_flags_with_archives_check_and_last_includes_last_flag():
    flags = module._make_check_flags(('archives', ), check_last=3)

    assert flags == ('--archives-only', '--last', '3', '--prefix',
                     module.DEFAULT_PREFIX)
コード例 #25
0
ファイル: test_check.py プロジェクト: DanielDent/borgmatic
def test_make_check_flags_with_default_checks_and_last_returns_last_flag():
    flags = module._make_check_flags(module.DEFAULT_CHECKS, check_last=3)

    assert flags == ('--last', '3')
コード例 #26
0
def test_make_check_flags_with_default_checks_and_last_includes_last_flag():
    flags = module._make_check_flags(module.DEFAULT_CHECKS, check_last=3)

    assert flags == ('--last', '3', '--prefix', module.DEFAULT_PREFIX)
コード例 #27
0
ファイル: test_check.py プロジェクト: karlfiabeschi/borgmatic
def test_make_check_flags_with_default_checks_and_default_prefix_returns_default_flags(
):
    flags = module._make_check_flags(module.DEFAULT_CHECKS,
                                     prefix=module.DEFAULT_PREFIX)

    assert flags == ('--prefix', module.DEFAULT_PREFIX)
コード例 #28
0
def test_make_check_flags_with_repository_check_and_prefix_omits_prefix_flag():
    flags = module._make_check_flags(('repository', ), prefix='foo-')

    assert flags == ('--repository-only', )
コード例 #29
0
def test_make_check_flags_with_archives_check_returns_flag():
    flags = module._make_check_flags(('archives',))

    assert flags == ('--archives-only',)