diff options
| author | Bob Halley <halley@dnspython.org> | 2021-11-09 07:36:30 -0800 |
|---|---|---|
| committer | Bob Halley <halley@dnspython.org> | 2021-11-09 07:36:30 -0800 |
| commit | 23dd006a6f234949b9fb3072c00ed9b7932020ea (patch) | |
| tree | eb5e2ed35f42add68b1ea6909a5849d674fda6e7 /tests | |
| parent | 246febc405089c8551cdba3e636d174e7446ca13 (diff) | |
| download | dnspython-win32util.tar.gz | |
Add WMI-based method for finding resolver info on Windows.win32util
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_resolver.py | 16 |
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): |
