def test_duplicate_vrf(self):
    vrf = VRF.objects.create(name='Test', rd='1:1', enforce_unique=False)
    IPAddress.objects.create(vrf=vrf, address=netaddr.IPNetwork('192.0.2.1/24'))
    duplicate_ip = IPAddress(vrf=vrf, address=netaddr.IPNetwork('192.0.2.1/24'))
    self.assertIsNone(duplicate_ip.clean())
def test_duplicate_vrf(self):
    vrf = VRF.objects.create(name='Test', rd='1:1', enforce_unique=False)
    IPAddress.objects.create(vrf=vrf, address=netaddr.IPNetwork('192.0.2.1/24'))
    duplicate_ip = IPAddress(vrf=vrf, address=netaddr.IPNetwork('192.0.2.1/24'))
    self.assertIsNone(duplicate_ip.clean())