Skip to content

Commit

Permalink
fix ci error
Browse files Browse the repository at this point in the history
  • Loading branch information
waketzheng committed Jun 26, 2024
1 parent 9cf52dd commit affd5d2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/online_cdn/test_online_race.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,16 @@ async def test_docs(client: AsyncClient): # nosec
)
assert urls.css in url_list
assert any(i in text for i in url_list)
assert any(
re.search(rf"{i.split('://')[-1].split('/')[0]}[\w/.-]+redoc", text2)
for i in url_list
)
for url in url_list:
host = url.split("://")[-1].split("/")[0]
pattern = rf'src=".*{host}[\w/.-]+redoc.*"'
if m := re.search(pattern, text2):
print(f"{m.group() = }")
break
else:
src_urls = re.findall(r'src="[^"]*redoc[^"]*"', text2)
print(f"{src_urls = }")
print(f"{url_list = }")
else:
assert urls.js in text
assert urls.css in text
Expand Down

0 comments on commit affd5d2

Please sign in to comment.