Read from DNS cache if within TTL

This commit is contained in:
Erik Johnston 2016-03-31 10:04:28 +01:00
parent a68c1b15aa
commit f699b8f997
2 changed files with 26 additions and 16 deletions

View file

@ -69,8 +69,11 @@ class DnsTestCase(unittest.TestCase):
service_name = "test_service.examle.com"
entry = Mock(spec_set=["expires"])
entry.expires = 999999999
cache = {
service_name: [object()]
service_name: [entry]
}
servers = yield resolve_service(