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
Branches main
No related tags found
No related merge requests found
...@@ -28,7 +28,8 @@ def parser(): ...@@ -28,7 +28,8 @@ def parser():
# req = requests.get(f"{ADDRESS}?mode=list&&articleLimit={LENGTH}&article.offset=0") # req = requests.get(f"{ADDRESS}?mode=list&&articleLimit={LENGTH}&article.offset=0")
context = ssl._create_unverified_context() context = ssl._create_unverified_context()
result = urlopen( 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() html = result.read()
...@@ -64,7 +65,7 @@ def test_parse(): ...@@ -64,7 +65,7 @@ def test_parse():
postLink = posts[i].get("href") postLink = posts[i].get("href")
postDate = dates[i].text.strip() postDate = dates[i].text.strip()
postWriter = writers[i].text 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 postLink is not None, f"postLink is None."
assert postTitle is not None, f"postTitle is None." assert postTitle is not None, f"postTitle is None."
assert postDate is not None, f"postDate 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