-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove retries any request that are within the context of the web app…
…lication This is to ensure we do not hang web requests due to issues with third party APIs
- Loading branch information
1 parent
39abc33
commit 4a422f2
Showing
3 changed files
with
31 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from api.app import initialize_application | ||
from core.util.http import HTTP | ||
from tests.fixtures.database import DatabaseTransactionFixture | ||
|
||
|
||
def test_initialize_application_http(db: DatabaseTransactionFixture): | ||
# Use the db transaction fixture so that we don't use the production settings by mistake | ||
assert HTTP.DEFAULT_REQUEST_RETRIES == 5 | ||
# Initialize the app, which will set the HTTP configuration | ||
initialize_application() | ||
# Now we have 0 retry logic | ||
assert HTTP.DEFAULT_REQUEST_RETRIES == 0 |