summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2021-11-16 05:42:22 -0800
committerGitHub <noreply@github.com>2021-11-16 05:42:22 -0800
commit3682de904a71c13421d256bf6b7bf4f7a52bdc51 (patch)
treeec2f57415a1338088feca01c7c305e8a71f31c65 /tests
parent6c77517b71e326f0e16510acce721a4a4f1dab3e (diff)
parent23dd006a6f234949b9fb3072c00ed9b7932020ea (diff)
downloaddnspython-3682de904a71c13421d256bf6b7bf4f7a52bdc51.tar.gz
Merge pull request #722 from rthalley/win32util
Add WMI-based method for finding resolver info on Windows.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_resolver.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/test_resolver.py b/tests/test_resolver.py
index eb83893..75822d9 100644
--- a/tests/test_resolver.py
+++ b/tests/test_resolver.py
@@ -886,15 +886,13 @@ class ResolverMiscTestCase(unittest.TestCase):
# not raising is the test
res._compute_timeout(now + 0.5)
- def test_configure_win32_domain(self):
- # This is a win32-related test but it works on all platforms so we
- # test it that way to make coverage analysis easier.
- n = dns.name.from_text('home.')
- res = dns.resolver.Resolver(configure=False)
- res._config_win32_domain('home')
- self.assertEqual(res.domain, n)
- res._config_win32_domain('.home')
- self.assertEqual(res.domain, n)
+ if sys.platform == 'win32':
+ def test_configure_win32_domain(self):
+ # This is a win32-related test but it works on all platforms so we
+ # test it that way to make coverage analysis easier.
+ n = dns.name.from_text('home.')
+ self.assertEqual(n, dns.win32util._config_domain('home'))
+ self.assertEqual(n, dns.win32util._config_domain('.home'))
class ResolverNameserverValidTypeTestCase(unittest.TestCase):