]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
fix the TooBig test, since the message code now imposes a minimum
authorBob Halley <halley@dnspython.org>
Fri, 2 Sep 2005 05:23:46 +0000 (05:23 +0000)
committerBob Halley <halley@dnspython.org>
Fri, 2 Sep 2005 05:23:46 +0000 (05:23 +0000)
maximum of 512

Original author: Bob Halley <halley@dnspython.org>
Date: 2004-10-26 00:30:13

tests/message.py

index fe73832e2a2490f9a13316be6ac8fe9f0f68828e..f790ff8958a656108785d15187b0511b282c69f2 100644 (file)
@@ -130,7 +130,13 @@ class MessageTestCase(unittest.TestCase):
     def test_TooBig(self):
         def bad():
             q = dns.message.from_text(query_text)
-            w = q.to_wire(max_size=15)
+            for i in xrange(0, 25):
+                rrset = dns.rrset.from_text('foo%d.' % i, 3600,
+                                            dns.rdataclass.IN,
+                                            dns.rdatatype.A,
+                                            '10.0.0.%d' % i)
+                q.additional.append(rrset)
+            w = q.to_wire(max_size=512)
         self.failUnlessRaises(dns.exception.TooBig, bad)
 
     def test_answer1(self):