Exemplo n.º 1
0
 def test_order(self):
     record1 = r.DNSAddress("a", r._TYPE_SOA, r._CLASS_IN, 1, b"a")
     record2 = r.DNSAddress("a", r._TYPE_SOA, r._CLASS_IN, 1, b"b")
     cache = r.DNSCache()
     cache.add(record1)
     cache.add(record2)
     entry = r.DNSEntry("a", r._TYPE_SOA, r._CLASS_IN)
     cached_record = cache.get(entry)
     self.assertEqual(cached_record, record2)
Exemplo n.º 2
0
 def test_order(self):
     record1 = r.DNSAddress('a', const._TYPE_SOA, const._CLASS_IN, 1, b'a')
     record2 = r.DNSAddress('a', const._TYPE_SOA, const._CLASS_IN, 1, b'b')
     cache = r.DNSCache()
     cache.add(record1)
     cache.add(record2)
     entry = r.DNSEntry('a', const._TYPE_SOA, const._CLASS_IN)
     cached_record = cache.get(entry)
     assert cached_record == record2