@override_settings(ENFORCE_GLOBAL_UNIQUE=False)
def test_duplicate_global(self):
    Prefix.objects.create(prefix=netaddr.IPNetwork('192.0.2.0/24'))
    duplicate_prefix = Prefix(prefix=netaddr.IPNetwork('192.0.2.0/24'))
    self.assertIsNone(duplicate_prefix.clean())
@override_settings(ENFORCE_GLOBAL_UNIQUE=False)
def test_duplicate_global(self):
    Prefix.objects.create(prefix=netaddr.IPNetwork('192.0.2.0/24'))
    duplicate_prefix = Prefix(prefix=netaddr.IPNetwork('192.0.2.0/24'))
    self.assertIsNone(duplicate_prefix.clean())