OXIESEC PANEL
- Current Dir:
/
/
usr
/
lib
/
python3
/
dist-packages
/
twisted
/
names
/
test
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/31/2022 06:22:38 AM
rwxr-xr-x
📄
__init__.py
26 bytes
09/08/2017 10:38:36 AM
rw-r--r--
📁
__pycache__
-
03/31/2022 06:22:39 AM
rwxr-xr-x
📄
test_cache.py
4.8 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
test_client.py
39.31 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
test_common.py
4.11 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
test_dns.py
150.45 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
test_examples.py
5.22 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
test_hosts.py
8.35 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
test_names.py
42.09 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
test_resolve.py
1.05 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
test_rfc1982.py
13.66 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
test_rootresolve.py
25.04 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
test_server.py
40.27 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
test_srvconnect.py
9.89 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
test_tap.py
4.84 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
test_util.py
3.82 KB
09/08/2017 10:38:36 AM
rw-r--r--
Editing: test_resolve.py
Close
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.names.resolve}. """ from twisted.trial.unittest import TestCase from twisted.names.error import DomainError from twisted.names.resolve import ResolverChain class ResolverChainTests(TestCase): """ Tests for L{twisted.names.resolve.ResolverChain} """ def test_emptyResolversList(self): """ L{ResolverChain._lookup} returns a L{DomainError} failure if its C{resolvers} list is empty. """ r = ResolverChain([]) d = r.lookupAddress('www.example.com') f = self.failureResultOf(d) self.assertIs(f.trap(DomainError), DomainError) def test_emptyResolversListLookupAllRecords(self): """ L{ResolverChain.lookupAllRecords} returns a L{DomainError} failure if its C{resolvers} list is empty. """ r = ResolverChain([]) d = r.lookupAllRecords('www.example.com') f = self.failureResultOf(d) self.assertIs(f.trap(DomainError), DomainError)