コード例 #1
0
ファイル: test_base_api.py プロジェクト: vche/pycliarr
def test_to_path_windows(patch_platform, patch_session):
    TEST_DIRNAME = Path("some title")
    cli = BaseCliApi(TEST_HOST,
                     TEST_APIKEY,
                     username=TEST_USER,
                     password=TEST_PASS)

    assert cli.to_path("some title") == TEST_DIRNAME
    assert cli.to_path("some /title") == TEST_DIRNAME
    assert cli.to_path("some: title") == TEST_DIRNAME
コード例 #2
0
ファイル: test_base_api.py プロジェクト: vche/pycliarr
def test_to_path_linux(patch_platform, patch_session):
    # For all unix based platforms (linux, bsd, osx...)
    TEST_DIRNAME = Path("some title")
    cli = BaseCliApi(TEST_HOST,
                     TEST_APIKEY,
                     username=TEST_USER,
                     password=TEST_PASS)

    assert cli.to_path("some title") == TEST_DIRNAME
    assert cli.to_path("some /title") == TEST_DIRNAME
    assert cli.to_path("some:title") == Path("some:title")