summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2013-05-16 12:13:22 +0200
committerAmitay Isaacs <amitay@samba.org>2013-05-16 15:39:14 +0200
commit46e98cf20b04f3668e96fb597a414d0b39d5b1ed (patch)
treef5c365cbb681e6882d04711f1a1f09f469779d42 /python
parent223cf7fb3026daa1d383a2e5796cbfe8beecaac2 (diff)
downloadsamba-46e98cf20b04f3668e96fb597a414d0b39d5b1ed.tar.gz
samba-46e98cf20b04f3668e96fb597a414d0b39d5b1ed.tar.bz2
samba-46e98cf20b04f3668e96fb597a414d0b39d5b1ed.zip
dns: Fix allocation of txt_record in txt record tests
Signed-off-by: Kai Blin <kai@samba.org> Reviewed-By: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Thu May 16 15:39:15 CEST 2013 on sn-devel-104
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/dns.py20
1 files 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