File diff 843dbaebdae4 → dadf26dab8ba
conntrackt/tests/test_models.py
Show inline comments
 
@@ -26,6 +26,7 @@ from django.test import TestCase
 

	
 
# Application imports.
 
from conntrackt.models import Project, Location, Entity, Interface, Communication
 
from conntrackt.models import SearchManager
 

	
 
# Test imports.
 
from .factories import ProjectFactory, LocationFactory
 
@@ -64,6 +65,13 @@ class ProjectTest(TestCase):
 

	
 
        self.assertEqual(project.get_absolute_url(), "/conntrackt/project/1/")
 

	
 
    def test_custom_manager(self):
 
        """
 
        Tests if the custom manager is being used.
 
        """
 

	
 
        self.assertIsInstance(Project.objects, SearchManager)
 

	
 

	
 
class LocationTest(TestCase):
 

	
 
@@ -159,6 +167,13 @@ class EntityTest(TestCase):
 
        entity.project = new_project
 
        self.assertRaisesRegexp(ValidationError, "The entity cannot be moved to different project as long as it has valid communications with entities in current project.", entity.clean)
 

	
 
    def test_custom_manager(self):
 
        """
 
        Tests if the custom manager is being used.
 
        """
 

	
 
        self.assertIsInstance(Entity.objects, SearchManager)
 

	
 

	
 
class InterfaceTest(TestCase):