File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 60
60
" \" v=spf1 -all\" "
61
61
]
62
62
},
63
+ {
64
+ "query" : {
65
+ "name" : " justtxt.joshdata.me" ,
66
+ "type" : " MX" ,
67
+ "class" : " IN"
68
+ },
69
+ "answer" : []
70
+ },
71
+ {
72
+ "query" : {
73
+ "name" : " justtxt.joshdata.me" ,
74
+ "type" : " A" ,
75
+ "class" : " IN"
76
+ },
77
+ "answer" : []
78
+ },
79
+ {
80
+ "query" : {
81
+ "name" : " justtxt.joshdata.me" ,
82
+ "type" : " AAAA" ,
83
+ "class" : " IN"
84
+ },
85
+ "answer" : []
86
+ },
63
87
{
64
88
"query" : {
65
89
"name" : " mail.example" ,
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ def test_deliverability_found():
21
21
22
22
23
23
def test_deliverability_fails ():
24
- # No MX record .
24
+ # Domain does not exist .
25
25
domain = 'xkxufoekjvjfjeodlfmdfjcu.com'
26
26
with pytest .raises (EmailUndeliverableError , match = f'The domain name { domain } does not exist' ):
27
27
validate_email_deliverability (domain , domain , dns_resolver = RESOLVER )
@@ -36,6 +36,12 @@ def test_deliverability_fails():
36
36
with pytest .raises (EmailUndeliverableError , match = f'The domain name { domain } does not send email' ):
37
37
validate_email_deliverability (domain , domain , dns_resolver = RESOLVER )
38
38
39
+ # No MX or A/AAAA records, but some other DNS records must
40
+ # exist such that the response is NOANSWER instead of NXDOMAIN.
41
+ domain = 'justtxt.joshdata.me'
42
+ with pytest .raises (EmailUndeliverableError , match = f'The domain name { domain } does not accept email' ):
43
+ validate_email_deliverability (domain , domain , dns_resolver = RESOLVER )
44
+
39
45
40
46
@pytest .mark .parametrize (
41
47
'email_input' ,
You can’t perform that action at this time.
0 commit comments