summary refs log tree commit diff
path: root/tests/test_dns.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-03-31 10:04:28 +0100
committerErik Johnston <erik@matrix.org>2016-03-31 10:04:28 +0100
commitf699b8f997ed743af0cfa7046428915a7f42610b (patch)
tree7700ec18f856a51bbc6b3bfc71e58bb94f0d63dd /tests/test_dns.py
parentspell out more packages (diff)
downloadsynapse-f699b8f997ed743af0cfa7046428915a7f42610b.tar.xz
Read from DNS cache if within TTL
Diffstat (limited to 'tests/test_dns.py')
-rw-r--r--tests/test_dns.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_dns.py b/tests/test_dns.py
index 637b1606f8..e006ed1a59 100644
--- a/tests/test_dns.py
+++ b/tests/test_dns.py
@@ -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(