~cbehrens/nova/lp844160-build-works-with-zones

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Copyright (c) 2006 Twisted Matrix Laboratories.
# See LICENSE for details.

import time

from twisted.trial import unittest

from twisted.names import dns, cache

class Caching(unittest.TestCase):
    def testLookup(self):
        c = cache.CacheResolver({
            dns.Query(name='example.com', type=dns.MX, cls=dns.IN): (time.time(), ([], [], []))})
        return c.lookupMailExchange('example.com').addCallback(self.assertEquals, ([], [], []))