-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
76 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
import savepagenow | ||
|
||
|
||
def test_capture(): | ||
"""Test the basic function of retriving a URL from Wayback.""" | ||
url = "https://www.latimes.com/" | ||
archive_url, c = savepagenow.capture_or_cache(url) | ||
assert archive_url.startswith("https://web.archive.org/") | ||
|
||
def test_auth_capture(): | ||
"""Test the retrieval of URL from Wayback with authentication""" | ||
url = "https://www.latimes.com/" | ||
# The env variables get pulled when we call capture() | ||
# You have to set access_key and secret to the appropriate values for your archive.org account | ||
archive_url, c = savepagenow.capture(url, authenticate=True) | ||
assert archive_url.startswith("https://web.archive.org/") |