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):
196196 bulk_api_url += "/"
197197 self .bulk_api_url = bulk_api_url
198198
199- self .test_inbox_id = get_anymail_setting (
200- "test_inbox_id" ,
201- esp_name = self .esp_name ,
202- kwargs = kwargs ,
203- )
204-
205199 self .testing_enabled = get_anymail_setting (
206200 "testing" ,
207201 esp_name = self .esp_name ,
@@ -210,14 +204,16 @@ def __init__(self, **kwargs):
210204 )
211205
212206 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+ )
219213 api_url = self .test_api_url
220214 self .bulk_api_url = self .test_api_url
215+ else :
216+ self .test_inbox_id = None
221217
222218 super ().__init__ (api_url , ** kwargs )
223219
You can’t perform that action at this time.
0 commit comments