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
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")