⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.30
Server IP:
45.79.8.107
Server:
Linux localhost 5.15.0-140-generic #150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025 x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.2-1ubuntu2.21
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
twisted
/
names
/
test
/
View File Name :
test_resolve.py
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.names.resolve}. """ from twisted.names.error import DomainError from twisted.names.resolve import ResolverChain from twisted.trial.unittest import TestCase 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)