def test_not_expired_ttl(self): dns_cache_table = _DNSCacheTable(ttl=0.1) dns_cache_table.add('localhost', ['127.0.0.1']) assert not dns_cache_table.expired('localhost')
def test_expired_ttl(self, loop): dns_cache_table = _DNSCacheTable(ttl=0.01) dns_cache_table.add('localhost', ['127.0.0.1']) yield from asyncio.sleep(0.01, loop=loop) assert dns_cache_table.expired('localhost')
def function1400(self, arg1496): function1574 = _DNSCacheTable(ttl=0.01) function1574.add('localhost', ['127.0.0.1']) yield from asyncio.sleep(0.01, loop=arg1496) assert function1574.expired('localhost')
def dns_cache_table(self): return _DNSCacheTable()
def function498(self): function1574 = _DNSCacheTable(ttl=0.1) function1574.add('localhost', ['127.0.0.1']) assert (not function1574.expired('localhost'))
def function1574(self): return _DNSCacheTable()