def test__no_save_range_overlap_end(self):
subnet = make_plain_subnet()
IPRange(
subnet=subnet,
type=IPRANGE_TYPE.DYNAMIC,
start_ip="192.168.0.100",
end_ip="192.168.0.150",
).save()
# Make an overlapping range across end_ip, should fail to save.
iprange = IPRange(
subnet=subnet,
type=IPRANGE_TYPE.DYNAMIC,
start_ip="192.168.0.140",
end_ip="192.168.0.160",
)
with ExpectedException(ValidationError, self.dynamic_overlaps):
iprange.save()
评论列表
文章目录