-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix network error when an incorrect download URL is outputted by the …
…Search API (#55) * Fix network error when an incorrect download URL is outputted by the Search API. * Remove coverage from exception handler.
- Loading branch information
Showing
4 changed files
with
55 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "4.0.0" | ||
__version__ = "4.0.1" |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Regression test for issue 54 | ||
def test_http_error_on_download(downloader, capsys): | ||
dl, _ = downloader | ||
|
||
filing_type = "8-K" | ||
cik = "0000101778" | ||
# Search API outputs an incorrect filename for this filing's detail document, | ||
# so we must catch the 404 HTTP error and continue execution normally. | ||
dl.get( | ||
filing_type, | ||
cik, | ||
download_details=True, | ||
include_amends=True, | ||
after="2001-02-26", | ||
before="2001-02-28", | ||
) | ||
|
||
captured = capsys.readouterr() | ||
# Full submission should download fine | ||
assert "skipping full submission download" not in captured.out.lower() | ||
# Filing detail download should fail | ||
assert "skipping filing detail download" in captured.out.lower() |