File diff 87d2821ecdfd → 079e7f2b0680
conntrackt/tests/test_models.py
Show inline comments
 
@@ -146,6 +146,19 @@ class InterfaceTest(TestCase):
 

	
 
        self.assertRaises(IntegrityError, duplicate.save)
 

	
 
    def test_unique_address(self):
 
        """
 
        Test if unique address/netmask is enforced across same entity.
 
        """
 

	
 
        entity = Entity.objects.get(pk=1)
 

	
 
        interface = entity.interface_set.get(pk=1)
 

	
 
        duplicate = Interface(name="eth1", description="Duplicate address", entity=entity, address=interface.address, netmask=interface.netmask)
 

	
 
        self.assertRaises(IntegrityError, duplicate.save)
 

	
 
    def test_representation_single(self):
 
        """
 
        Test representation of single IP address.