Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
71378c10
Commit
71378c10
authored
Nov 21, 2011
by
JINMEI Tatuya
Browse files
[1371] cleanup: removed rrsets_equal() from datasrc_test.py
parent
de43982b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/python/isc/datasrc/tests/datasrc_test.py
View file @
71378c10
...
...
@@ -17,6 +17,7 @@ import isc.log
import
isc.datasrc
from
isc.datasrc
import
ZoneFinder
,
ZoneJournalReader
from
isc.dns
import
*
from
isc.testutils.rrset_utils
import
rrsets_equal
import
unittest
import
sqlite3
import
os
...
...
@@ -40,19 +41,6 @@ def add_rrset(rrset_list, name, rrclass, rrtype, ttl, rdatas):
rrset_to_add
.
add_rdata
(
isc
.
dns
.
Rdata
(
rrtype
,
rrclass
,
rdata
))
rrset_list
.
append
(
rrset_to_add
)
# helper function, we have no direct rrset comparison atm
def
rrsets_equal
(
a
,
b
):
# no accessor for sigs either (so this only checks name, class, type, ttl,
# and rdata)
# also, because of the fake data in rrsigs, if the type is rrsig, the
# rdata is not checked
return
a
.
get_name
()
==
b
.
get_name
()
and
\
a
.
get_class
()
==
b
.
get_class
()
and
\
a
.
get_type
()
==
b
.
get_type
()
and
\
a
.
get_ttl
()
==
b
.
get_ttl
()
and
\
(
a
.
get_type
()
==
isc
.
dns
.
RRType
.
RRSIG
()
or
sorted
(
a
.
get_rdata
())
==
sorted
(
b
.
get_rdata
()))
# returns true if rrset is in expected_rrsets
# will remove the rrset from expected_rrsets if found
def
check_for_rrset
(
expected_rrsets
,
rrset
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment