test for total_archives()
This commit is contained in:
parent
d0a4e25cf5
commit
7605b614ee
@ -71,6 +71,14 @@ def test_get():
|
|||||||
oldest_google_page_text = waybackpy.get(oldest_google_archive, UA=user_agent)
|
oldest_google_page_text = waybackpy.get(oldest_google_archive, UA=user_agent)
|
||||||
assert "Welcome to Google" in oldest_google_page_text
|
assert "Welcome to Google" in oldest_google_page_text
|
||||||
|
|
||||||
|
def test_total_archives():
|
||||||
|
|
||||||
|
count1 = total_archives("https://en.wikipedia.org/wiki/Python (programming language)", UA=user_agent)
|
||||||
|
assert count1 > 2000
|
||||||
|
|
||||||
|
count2 = total_archives("https://gaha.e4i3n.m5iai3kip6ied.cima/gahh2718gs/ahkst63t7gad8", UA=user_agent)
|
||||||
|
assert count2 == 0
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
test_clean_url()
|
test_clean_url()
|
||||||
print(".")
|
print(".")
|
||||||
@ -86,3 +94,5 @@ if __name__ == "__main__":
|
|||||||
print(".")
|
print(".")
|
||||||
test_oldest()
|
test_oldest()
|
||||||
print(".")
|
print(".")
|
||||||
|
test_total_archives()
|
||||||
|
print(".")
|
||||||
|
Loading…
Reference in New Issue
Block a user