Skip to content

Commit 6e825bf

Browse files
committed
Update mocked-dns-answers.json and sort answers for stable diffs going forward
This is done by setting mocked_dns_response.BUILD_MOCKED_DNS_RESPONSE_DATA = True. Some queries are removed. Probably because of earlier changes that some exceptions end DNS checks earlier.
1 parent b32933d commit 6e825bf

File tree

2 files changed

+7
-31
lines changed

2 files changed

+7
-31
lines changed

tests/mocked-dns-answers.json

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,12 @@
77
},
88
"answer": [
99
"10 alt1.gmail-smtp-in.l.google.com.",
10-
"30 alt3.gmail-smtp-in.l.google.com.",
11-
"5 gmail-smtp-in.l.google.com.",
1210
"20 alt2.gmail-smtp-in.l.google.com.",
13-
"40 alt4.gmail-smtp-in.l.google.com."
11+
"30 alt3.gmail-smtp-in.l.google.com.",
12+
"40 alt4.gmail-smtp-in.l.google.com.",
13+
"5 gmail-smtp-in.l.google.com."
1414
]
1515
},
16-
{
17-
"query": {
18-
"name": "xkxufoekjvjfjeodlfmdfjcu.com",
19-
"type": "MX",
20-
"class": "IN"
21-
},
22-
"answer": []
23-
},
2416
{
2517
"query": {
2618
"name": "xkxufoekjvjfjeodlfmdfjcu.com",
@@ -64,18 +56,10 @@
6456
"class": "IN"
6557
},
6658
"answer": [
67-
"\"v=spf1 -all\"",
68-
"\"MS=ms47108184\""
59+
"\"MS=ms47108184\"",
60+
"\"v=spf1 -all\""
6961
]
7062
},
71-
{
72-
"query": {
73-
"name": "mail.example",
74-
"type": "MX",
75-
"class": "IN"
76-
},
77-
"answer": []
78-
},
7963
{
8064
"query": {
8165
"name": "mail.example",
@@ -84,14 +68,6 @@
8468
},
8569
"answer": []
8670
},
87-
{
88-
"query": {
89-
"name": "mail.example.com",
90-
"type": "MX",
91-
"class": "IN"
92-
},
93-
"answer": []
94-
},
9571
{
9672
"query": {
9773
"name": "mail.example.com",

tests/mocked_dns_response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ def save(self):
7272
"type": dns.rdatatype.to_text(key[1]),
7373
"class": dns.rdataclass.to_text(key[2]),
7474
},
75-
"answer": [
75+
"answer": sorted([
7676
rr.to_text()
7777
for rr in value
78-
]
78+
])
7979
}
8080
for key, value in self.data.items()
8181
]

0 commit comments

Comments
 (0)