From 46e98cf20b04f3668e96fb597a414d0b39d5b1ed Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Thu, 16 May 2013 12:13:22 +0200 Subject: dns: Fix allocation of txt_record in txt record tests Signed-off-by: Kai Blin Reviewed-By: Amitay Isaacs Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Thu May 16 15:39:15 CEST 2013 on sn-devel-104 --- python/samba/tests/dns.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/python/samba/tests/dns.py b/python/samba/tests/dns.py index b29302b970..15672a0b00 100644 --- a/python/samba/tests/dns.py +++ b/python/samba/tests/dns.py @@ -390,8 +390,9 @@ class TestDNSUpdates(DNSTest): r.rr_class = dns.DNS_QCLASS_IN r.ttl = 900 r.length = 0xffff - r.rdata = dns.txt_record() - r.rdata.txt = '"This is a test"' + rdata = dns.txt_record() + rdata.txt = '"This is a test"' + r.rdata = rdata updates.append(r) p.nscount = len(updates) p.nsrecs = updates @@ -430,8 +431,9 @@ class TestDNSUpdates(DNSTest): r.rr_class = dns.DNS_QCLASS_IN r.ttl = 900 r.length = 0xffff - r.rdata = dns.txt_record() - r.rdata.txt = '"This is a test" "and this is a test, too"' + rdata = dns.txt_record() + rdata.txt = '"This is a test" "and this is a test, too"' + r.rdata = rdata updates.append(r) p.nscount = len(updates) p.nsrecs = updates @@ -474,8 +476,9 @@ class TestDNSUpdates(DNSTest): r.rr_class = dns.DNS_QCLASS_IN r.ttl = 900 r.length = 0xffff - r.rdata = dns.txt_record() - r.rdata.txt = '"This is a test"' + rdata = dns.txt_record() + rdata.txt = '"This is a test"' + r.rdata = rdata updates.append(r) p.nscount = len(updates) p.nsrecs = updates @@ -510,8 +513,9 @@ class TestDNSUpdates(DNSTest): r.rr_class = dns.DNS_QCLASS_NONE r.ttl = 0 r.length = 0xffff - r.rdata = dns.txt_record() - r.rdata.txt = '"This is a test"' + rdata = dns.txt_record() + rdata.txt = '"This is a test"' + r.rdata = rdata updates.append(r) p.nscount = len(updates) p.nsrecs = updates -- cgit