fix: follow gov.cn api change

This commit is contained in:
NateScarlet
2023-08-17 22:09:12 +08:00
parent 8e4cf83082
commit cd791e1893
2 changed files with 57 additions and 33 deletions

View File

@@ -16,8 +16,8 @@ from filetools import workspace_path
def test_get_paper_urls():
assert get_paper_urls(2019) == [
"http://www.gov.cn/zhengce/content/2018-12/06/content_5346276.htm",
"http://www.gov.cn/zhengce/content/2019-03/22/content_5375877.htm",
"http://www.gov.cn/zhengce/zhengceku/2018-12/06/content_5346276.htm",
"http://www.gov.cn/zhengce/zhengceku/2019-03/22/content_5375877.htm",
]
@@ -25,7 +25,7 @@ def test_get_rules():
assert list(
get_rules(
get_paper(
"http://www.gov.cn/zhengce/content/2019-03/22/content_5375877.htm"
"http://www.gov.cn/zhengce/zhengceku/2019-03/22/content_5375877.htm"
)
)
) == [("劳动节", "2019年5月1日至4日放假调休共4天。4月28日星期日、5月5日星期日上班。")]
@@ -35,7 +35,7 @@ def test_get_rules_2023():
got = list(
get_rules(
get_paper(
"http://www.gov.cn/zhengce/content/2022-12/08/content_5730844.htm"
"http://www.gov.cn/zhengce/zhengceku/2022-12/08/content_5730844.htm"
)
)
)