diff options
| author | Bob Halley <halley@dnspython.org> | 2005-09-02 05:23:30 +0000 |
|---|---|---|
| committer | Bob Halley <halley@dnspython.org> | 2005-09-02 05:23:30 +0000 |
| commit | cf5ba2546bb64b76c0c4fd31c64654c19c647f71 (patch) | |
| tree | 620e26ea88b23ad4b15651f93b4c570da553ed63 /tests | |
| parent | 787de5aad206e43b60924843c9b1cab3cedcfdf4 (diff) | |
| download | dnspython-cf5ba2546bb64b76c0c4fd31c64654c19c647f71.tar.gz | |
The 'file' parameter to Name.to_wire() is now optional. The 'file'
parameter to Name.to_wire() is now optional; if omitted, the wire form
will be returned as the value of the function. This makes getting the
wire form of a name more convenient.
Original author: Bob Halley <halley@dnspython.org>
Date: 2004-09-02 20:12:17
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/name.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/name.py b/tests/name.py index bc7f177..9de3dbe 100644 --- a/tests/name.py +++ b/tests/name.py @@ -399,6 +399,11 @@ class NameTestCase(unittest.TestCase): self.failUnless(f.getvalue() == \ '\x03FOO\x03bar\x00\x01\x61\x03foo\x03bar\x00') + def testToWire6(self): + n = dns.name.from_text('FOO.bar') + v = n.to_wire() + self.failUnless(v == '\x03FOO\x03bar\x00') + def testBadToWire(self): def bad(): n = dns.name.from_text('FOO.bar', None) |
