1 Star 0 Fork 0

Sync.Nep / djc_helper

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test_lanzou.py 718 Bytes
一键复制 编辑 原始数据 按行查看 历史
from lanzou.api import LanZouCloud
from lanzou.api.utils import is_file_url, is_folder_url, time_format
from util import parse_time
def test_is_file_url():
# 确保每个备案的域名都能正确判定
for domain in LanZouCloud().available_domains_shuffled:
assert is_file_url(f"https://pan.{domain}/i1234abcd")
def test_is_folder_url():
# 确保每个备案的域名都能正确判定
for domain in LanZouCloud().available_domains_shuffled:
assert is_folder_url(f"https://pan.{domain}/b1234abcd")
def test_time_format():
# fix: 原先这里会直接返回 2022-03-25 ,与预期不符
time_str = time_format("2022-03-25")
parse_time(time_str, "%Y-%m-%d %H:%M:%S")
1
https://gitee.com/a915646637/djc_helper.git
git@gitee.com:a915646637/djc_helper.git
a915646637
djc_helper
djc_helper
master

搜索帮助