~landscape/zope3/newer-from-ztk

« back to all changes in this revision

Viewing changes to src/twisted/names/test/test_cache.py

  • Committer: Thomas Hervé
  • Date: 2009-07-08 13:52:04 UTC
  • Revision ID: thomas@canonical.com-20090708135204-df5eesrthifpylf8
Remove twisted copy

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (c) 2006 Twisted Matrix Laboratories.
2
 
# See LICENSE for details.
3
 
 
4
 
import time
5
 
 
6
 
from twisted.trial import unittest
7
 
 
8
 
from twisted.names import dns, cache
9
 
 
10
 
class Caching(unittest.TestCase):
11
 
    def testLookup(self):
12
 
        c = cache.CacheResolver({
13
 
            dns.Query(name='example.com', type=dns.MX, cls=dns.IN): (time.time(), ([], [], []))})
14
 
        return c.lookupMailExchange('example.com').addCallback(self.assertEquals, ([], [], []))