Esempio n. 1
0
 def test_pdb_to_peer(self):
     ixp = peerfinder.pdb_to_ixp(self.netixlan_set)
     fac = peerfinder.pdb_to_fac(self.netfac_set)
     expected = peerfinder.Peer(
         name="Test Peer", ASN=65536, peering_on=ixp, present_in=fac,
     )
     self.assertEqual(expected, peerfinder.pdb_to_peer(self.peer, ixp, fac))
Esempio n. 2
0
 def test_fetch_common_facilities(self):
     ixp = [peerfinder.pdb_to_ixp(self.netixlan_set)]
     fac = [peerfinder.pdb_to_fac(self.netfac_set)]
     peer = [peerfinder.pdb_to_peer(self.peer, ixp, fac)]
     expected = {"Test Facility"}
     self.assertEqual(expected, peerfinder.fetch_common_facilities(peer))