1
1
import time
2
2
3
- from braze .client import _wait_random_exp_or_rate_limit , BrazeClientError , \
4
- BrazeInternalServerError
3
+ from braze .client import _wait_random_exp_or_rate_limit
5
4
from braze .client import BrazeClient
5
+ from braze .client import BrazeClientError
6
+ from braze .client import BrazeInternalServerError
6
7
from braze .client import BrazeRateLimitError
7
8
from braze .client import MAX_RETRIES
8
9
from braze .client import MAX_WAIT_SECONDS
@@ -95,9 +96,7 @@ def test_user_track_request_exception(
95
96
self , braze_client , mocker , attributes , events , purchases
96
97
):
97
98
mocker .patch .object (
98
- BrazeClient ,
99
- "_post_request_with_retries" ,
100
- side_effect = RequestException ,
99
+ BrazeClient , "_post_request_with_retries" , side_effect = RequestException
101
100
)
102
101
103
102
with pytest .raises (RequestException ):
@@ -109,9 +108,7 @@ def test_user_track_request_exception(
109
108
110
109
@pytest .mark .parametrize (
111
110
"status_code, retry_attempts, error" ,
112
- [
113
- (500 , MAX_RETRIES , BrazeInternalServerError ),
114
- (401 , 1 , BrazeClientError )]
111
+ [(500 , MAX_RETRIES , BrazeInternalServerError ), (401 , 1 , BrazeClientError )],
115
112
)
116
113
def test_retries_for_errors (
117
114
self ,
0 commit comments