]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix unit test for python 3.7 new keyword 'async'.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 24 Jan 2019 09:37:57 +0000 (09:37 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 24 Jan 2019 09:37:57 +0000 (09:37 +0000)
git-svn-id: file:///svn/unbound/trunk@5069 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
testdata/pylib.tdir/pylib.lookup.py

index f466a2944edc715cdd1bdb41eea93780175122d0..b3fd66c1465415144eb53c322e482787e5f6e914 100644 (file)
@@ -1,6 +1,7 @@
 24 January 2018: Wouter
        - Newer aclocal and libtoolize used for generating configure scripts,
          aclocal 1.16.1 and libtoolize 2.4.6.
+       - Fix unit test for python 3.7 new keyword 'async'.
 
 23 January 2018: Wouter
        - Patch from Manabu Sonoda with tls-ciphers and tls-ciphersuites
index 5f69c58abd1868d06e3e0f98a344c83ff2c2c19f..114bb49a0902204dddb9a83e5d498088b001c4da 100755 (executable)
@@ -12,7 +12,7 @@ qname = "www.example.com"
 qtype = unbound.RR_TYPE_A
 qclass = unbound.RR_CLASS_IN
 
-def create_context(config_file="ub.lookup.conf", async=False):
+def create_context(config_file="ub.lookup.conf", asyncflag=False):
     """
     Create an unbound context to use for testing.
 
@@ -22,7 +22,7 @@ def create_context(config_file="ub.lookup.conf", async=False):
     if status != 0:
         print("read config failed with status: {}".format(status))
         sys.exit(1)
-    ctx.set_async(async)
+    ctx.set_async(asyncflag)
     return ctx
 
 
@@ -132,10 +132,10 @@ def test_ratelimit_bg_off(ctx):
 
 
 test_resolve(create_context())
-test_async_resolve(create_context(async=True))
+test_async_resolve(create_context(asyncflag=True))
 test_ratelimit_fg_on(create_context())
 test_ratelimit_fg_off(create_context())
-test_ratelimit_bg_on(create_context(async=True))
-test_ratelimit_bg_off(create_context(async=True))
+test_ratelimit_bg_on(create_context(asyncflag=True))
+test_ratelimit_bg_off(create_context(asyncflag=True))
 
 sys.exit(0)