From 7605b614ee1c11623db34dbe813661bb2fba9d81 Mon Sep 17 00:00:00 2001 From: akamhy <64683866+akamhy@users.noreply.github.com> Date: Thu, 7 May 2020 15:00:28 +0530 Subject: [PATCH] test for total_archives() --- tests/test_1.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_1.py b/tests/test_1.py index cd084aa..09ab492 100644 --- a/tests/test_1.py +++ b/tests/test_1.py @@ -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(".")