BIND 10 trac2437, updated. 6e4caf9dd4f4239776d1e05efbfe13987e5bf9a5 [2437] use a string for the default of test find_result.

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Jan 7 21:56:11 UTC 2013


The branch, trac2437 has been updated
       via  6e4caf9dd4f4239776d1e05efbfe13987e5bf9a5 (commit)
      from  fb10ec4e31a94ed4c98fa83c5ef3064f8e53a39e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6e4caf9dd4f4239776d1e05efbfe13987e5bf9a5
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Mon Jan 7 13:46:53 2013 -0800

    [2437] use a string for the default of test find_result.
    
    it's probably more intuitive than False.

-----------------------------------------------------------------------

Summary of changes:
 .../dns/python/tests/zone_checker_python_test.py   |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dns/python/tests/zone_checker_python_test.py b/src/lib/dns/python/tests/zone_checker_python_test.py
index a424a28..66b6c47 100644
--- a/src/lib/dns/python/tests/zone_checker_python_test.py
+++ b/src/lib/dns/python/tests/zone_checker_python_test.py
@@ -119,17 +119,18 @@ class ZoneCheckerTest(unittest.TestCase):
             # This is the Python-only collection class.  Its find() makes
             # the check pass by default, by returning hardcoded RRsets.
             # If raise_on_find is set to True, find() raises an exception.
-            # If find_result is set to something other than False, find()
-            # returns that specified value.
+            # If find_result is set to something other than 'use_default'
+            # (as a string), find() returns that specified value (note that
+            # it can be None).
 
-            def __init__(self, raise_on_find=False, find_result=False):
+            def __init__(self, raise_on_find=False, find_result='use_default'):
                 self.__raise_on_find = raise_on_find
                 self.__find_result = find_result
 
             def find(self, name, rrclass, rrtype):
                 if self.__raise_on_find:
                     raise FakeException('find error')
-                if self.__find_result is not False:
+                if self.__find_result is not 'use_default':
                     return self.__find_result
                 if rrtype == RRType.SOA():
                     soa = RRset(Name('example'), RRClass.IN(), rrtype,



More information about the bind10-changes mailing list