diff options
| author | Brian Wellington <bwelling@xbill.org> | 2021-10-14 11:15:55 -0700 |
|---|---|---|
| committer | Brian Wellington <bwelling@xbill.org> | 2021-10-14 11:15:55 -0700 |
| commit | 4eb5dc951ebe26f0b8b909d241607a19ac49fdc6 (patch) | |
| tree | 8cbb6618ee7d77c4e948f0d9260a17b485610dd9 /tests | |
| parent | fd830f71579f8337d0f9a0c3c40e7b5683957cc4 (diff) | |
| download | dnspython-4eb5dc951ebe26f0b8b909d241607a19ac49fdc6.tar.gz | |
Add id to dns.message.make_query().
Allow the caller to supply a message id when building a query.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_message.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_message.py b/tests/test_message.py index 19738e6..8fcc674 100644 --- a/tests/test_message.py +++ b/tests/test_message.py @@ -437,6 +437,10 @@ class MessageTestCase(unittest.TestCase): self.assertEqual(q.payload, 4096) self.assertEqual(q.options, ()) + def test_setting_id(self): + q = dns.message.make_query('www.dnspython.org.', 'a', id=12345) + self.assertEqual(q.id, 12345) + def test_generic_message_class(self): q1 = dns.message.Message(id=1) q1.set_opcode(dns.opcode.NOTIFY) |
