Lines Matching refs:ipv4_network
811 self.ipv4_network = ipaddress.IPv4Network('1.2.3.0/24')
968 self.assertEqual("IPv4Network('1.2.3.0/24')", repr(self.ipv4_network))
985 self.assertEqual(int(self.ipv4_network.network_address), 16909056)
986 self.assertEqual(str(self.ipv4_network.network_address), '1.2.3.0')
1039 self.assertEqual(int(self.ipv4_network.netmask), 4294967040)
1040 self.assertEqual(str(self.ipv4_network.netmask), '255.255.255.0')
1058 net = self.ipv4_network
1074 self.assertEqual(int(self.ipv4_network.broadcast_address), 16909311)
1075 self.assertEqual(str(self.ipv4_network.broadcast_address), '1.2.3.255')
1087 self.assertEqual(self.ipv4_network.supernet().prefixlen, 23)
1088 self.assertEqual(str(self.ipv4_network.supernet().network_address),
1101 self.assertEqual(self.ipv4_network.supernet(3).prefixlen, 21)
1102 self.assertEqual(str(self.ipv4_network.supernet(3).network_address),
1110 self.assertRaises(ValueError, self.ipv4_network.supernet,
1112 self.assertRaises(ValueError, self.ipv4_network.supernet,
1114 self.assertEqual(self.ipv4_network.supernet(prefixlen_diff=2),
1115 self.ipv4_network.supernet(new_prefix=22))
1125 hosts = list(self.ipv4_network.hosts())
1156 self.assertEqual(sorted(self.ipv4_network.subnets(prefixlen_diff=3)),
1157 sorted(self.ipv4_network.subnets(new_prefix=27)))
1159 self.ipv4_network.subnets(new_prefix=23))
1161 self.ipv4_network.subnets(prefixlen_diff=3,
1172 self.assertEqual(list(self.ipv4_network.subnets())[0].prefixlen, 25)
1174 self.ipv4_network.subnets())[0].network_address),
1177 self.ipv4_network.subnets())[1].network_address),
1197 ips = [str(x) for x in self.ipv4_network.subnets(2)]
1211 subnets = [str(x) for x in self.ipv4_network.subnets(8)]
1234 self.ipv4_network.subnets(9))
1250 self.ipv4_network.subnets(-1))
1257 self.assertEqual(self.ipv4_network.num_addresses, 256)
1258 self.assertEqual(list(self.ipv4_network.subnets())[0].num_addresses,
1260 self.assertEqual(self.ipv4_network.supernet().num_addresses, 512)
1270 self.ipv4_network)
1272 self.ipv4_network)
1275 self.assertIn(addr1, self.ipv4_network)
1282 self.assertEqual(str(self.ipv4_network[5]), '1.2.3.5')
1283 self.assertRaises(IndexError, self.ipv4_network.__getitem__, 256)
1577 self.ipv4_network.compare_networks,
1640 self.assertTrue(self.ipv4_network.overlaps(other))
1641 self.assertFalse(self.ipv4_network.overlaps(other2))
1899 net = self.ipv4_network
1914 net = self.ipv4_network
2010 self.assertNotIn('network_address', self.ipv4_network._cache)
2011 self.assertNotIn('broadcast_address', self.ipv4_network._cache)
2012 self.assertNotIn('hostmask', self.ipv4_network._cache)
2015 self.assertEqual(self.ipv4_network.network_address,
2017 self.assertEqual(self.ipv4_network.broadcast_address,
2019 self.assertEqual(self.ipv4_network.hostmask,
2023 self.assertIn('broadcast_address', self.ipv4_network._cache)
2024 self.assertIn('hostmask', self.ipv4_network._cache)