summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2005-09-02 05:33:17 +0000
committerBob Halley <halley@dnspython.org>2005-09-02 05:33:17 +0000
commit36afc883717f9f62dfd63a64c17035b9b2e5498d (patch)
tree69bae7980c245088d253fe13dfd98f602579d60d /tests
parent4d625cd8f3be221d61983409e910bfc1df240ff5 (diff)
downloaddnspython-36afc883717f9f62dfd63a64c17035b9b2e5498d.tar.gz
fix problem throwing FormErr when responding to a response
Original author: Bob Halley <halley@dnspython.org> Date: 2005-08-01 03:32:11
Diffstat (limited to 'tests')
-rw-r--r--tests/message.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/message.py b/tests/message.py
index cbe7936..0a35f42 100644
--- a/tests/message.py
+++ b/tests/message.py
@@ -156,5 +156,12 @@ class MessageTestCase(unittest.TestCase):
m = dns.message.from_wire(badwire)
self.failUnlessRaises(dns.message.ShortHeader, bad)
+ def test_RespondingToResponse(self):
+ def bad():
+ q = dns.message.make_query('foo', 'A')
+ r1 = dns.message.make_response(q)
+ r2 = dns.message.make_response(r1)
+ self.failUnlessRaises(dns.exception.FormError, bad)
+
if __name__ == '__main__':
unittest.main()