test for total_archives()

This commit is contained in:
akamhy 2020-05-07 15:00:28 +05:30 committed by GitHub
parent d0a4e25cf5
commit 7605b614ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,6 +71,14 @@ def test_get():
oldest_google_page_text = waybackpy.get(oldest_google_archive, UA=user_agent)
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__":
test_clean_url()
print(".")
@ -86,3 +94,5 @@ if __name__ == "__main__":
print(".")
test_oldest()
print(".")
test_total_archives()
print(".")