]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
increase message coverage
authorBob Halley <halley@dnspython.org>
Thu, 18 Jun 2020 15:55:15 +0000 (08:55 -0700)
committerBob Halley <halley@dnspython.org>
Thu, 18 Jun 2020 15:55:15 +0000 (08:55 -0700)
tests/test_message.py

index 4e80e01eca6ab5bb6d5ee8fc424872ba72e026f2..6fb36693f111c3077655a25098adb7db671d1a73 100644 (file)
@@ -189,6 +189,12 @@ class MessageTestCase(unittest.TestCase):
             dns.message.make_response(r1)
         self.assertRaises(dns.exception.FormError, bad)
 
+    def test_RespondingToEDNSRequestAndSettingRA(self):
+        q = dns.message.make_query('foo', 'A', use_edns=0)
+        r = dns.message.make_response(q, True)
+        self.assertTrue(r.flags & dns.flags.RA != 0)
+        self.assertEqual(r.edns, 0)
+
     def test_ExtendedRcodeSetting(self):
         m = dns.message.make_query('foo', 'A')
         m.set_rcode(4095)