File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -196,12 +196,6 @@ def __init__(self, **kwargs):
196
196
bulk_api_url += "/"
197
197
self .bulk_api_url = bulk_api_url
198
198
199
- self .test_inbox_id = get_anymail_setting (
200
- "test_inbox_id" ,
201
- esp_name = self .esp_name ,
202
- kwargs = kwargs ,
203
- )
204
-
205
199
self .testing_enabled = get_anymail_setting (
206
200
"testing" ,
207
201
esp_name = self .esp_name ,
@@ -210,14 +204,16 @@ def __init__(self, **kwargs):
210
204
)
211
205
212
206
if self .testing_enabled :
213
- if not self .test_inbox_id :
214
- warnings . warn (
215
- "Mailtrap testing is enabled, but no test_inbox_id is set. "
216
- "You must set test_inbox_id for Mailtrap testing to work." ,
217
- AnymailWarning ,
218
- )
207
+ self .test_inbox_id = get_anymail_setting (
208
+ "test_inbox_id" ,
209
+ esp_name = self . esp_name ,
210
+ kwargs = kwargs ,
211
+ # (no default means required -- error if not set)
212
+ )
219
213
api_url = self .test_api_url
220
214
self .bulk_api_url = self .test_api_url
215
+ else :
216
+ self .test_inbox_id = None
221
217
222
218
super ().__init__ (api_url , ** kwargs )
223
219
You can’t perform that action at this time.
0 commit comments