Skip to content
Snippets Groups Projects
Unverified Commit 81386428 authored by Seok Won's avatar Seok Won
Browse files

Update test_parser.py

parent 7ed47a63
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,8 @@ def parser():
# req = requests.get(f"{ADDRESS}?mode=list&&articleLimit={LENGTH}&article.offset=0")
context = ssl._create_unverified_context()
result = urlopen(
f"{ADDRESS}?mode=list&&articleLimit={LENGTH}&article.offset=0", context=context
f"{ADDRESS}?mode=list&srCategoryId=3&srSearchKey=&srSearchVal=&articleLimit={LENGTH}&article.offset=0",
context=context,
)
html = result.read()
......@@ -64,7 +65,7 @@ def test_parse():
postLink = posts[i].get("href")
postDate = dates[i].text.strip()
postWriter = writers[i].text
assert int(postId) > 10000, f"postId is None."
# assert int(postId) > 10000, f"postId is None."
assert postLink is not None, f"postLink is None."
assert postTitle is not None, f"postTitle is None."
assert postDate is not None, f"postDate is None."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment