File diff 1291c9123c45 → ba26a581c827
conntrackt/tests/test_views.py
Show inline comments
 
@@ -164,7 +164,7 @@ class ProjectViewTest(RenderTestMixin, P
 

	
 
        # Validate context data.
 
        self.assertEqual(location.name, "Test Location 1")
 
        self.assertQuerysetEqual(entities, expected_entities)
 
        self.assertQuerysetEqual(entities, expected_entities, ordered=False)
 

	
 
        # Fetch context data from response.
 
        location, entities = response.context_data["location_entities"][1]
 
@@ -175,7 +175,7 @@ class ProjectViewTest(RenderTestMixin, P
 

	
 
        # Validate context data.
 
        self.assertEqual(location.name, "Test Location 2")
 
        self.assertQuerysetEqual(entities, expected_entities)
 
        self.assertQuerysetEqual(entities, expected_entities, ordered=False)
 

	
 
        # Validate context data.
 
        self.assertEqual(str(response.context_data["project"]), "Test Project 1")
 
@@ -911,7 +911,7 @@ class InterfaceUpdateViewTest(RenderTest
 
                             "<Entity: Test Entity 3 (Test Project 1 - Test Location 2)>",
 
                             "<Entity: Test Subnet 4 (Test Project 1 - Test Location 2)>"]
 

	
 
        self.assertQuerysetEqual(form.fields["entity"].queryset, expected_entities)
 
        self.assertQuerysetEqual(form.fields["entity"].queryset, expected_entities, ordered=False)
 

	
 
    def test_success_url(self):
 
        """
 
@@ -1049,8 +1049,8 @@ class CommunicationCreateViewTest(Render
 
        expected_interfaces = ["<Interface: Test Entity 1 (192.168.1.1)>",
 
                               "<Interface: Test Entity 2 (192.168.1.2)>"]
 

	
 
        self.assertQuerysetEqual(form.fields["source"].queryset, expected_interfaces)
 
        self.assertQuerysetEqual(form.fields["destination"].queryset, expected_interfaces)
 
        self.assertQuerysetEqual(form.fields["source"].queryset, expected_interfaces, ordered = False)
 
        self.assertQuerysetEqual(form.fields["destination"].queryset, expected_interfaces, ordered = False)
 

	
 
    def test_interface_limit_to_entity(self):
 
        """
 
@@ -1069,8 +1069,8 @@ class CommunicationCreateViewTest(Render
 
        expected_interfaces = ["<Interface: Test Entity 1 (192.168.1.1)>",
 
                               "<Interface: Test Entity 2 (192.168.1.2)>"]
 

	
 
        self.assertQuerysetEqual(form.fields["source"].queryset, expected_interfaces)
 
        self.assertQuerysetEqual(form.fields["destination"].queryset, expected_interfaces)
 
        self.assertQuerysetEqual(form.fields["source"].queryset, expected_interfaces, ordered=False)
 
        self.assertQuerysetEqual(form.fields["destination"].queryset, expected_interfaces, ordered=False)
 

	
 
    def test_interface_limit_project(self):
 
        """
 
@@ -1089,8 +1089,8 @@ class CommunicationCreateViewTest(Render
 
        expected_interfaces = ["<Interface: Test Entity 1 (192.168.1.1)>",
 
                               "<Interface: Test Entity 2 (192.168.1.2)>"]
 

	
 
        self.assertQuerysetEqual(form.fields["source"].queryset, expected_interfaces)
 
        self.assertQuerysetEqual(form.fields["destination"].queryset, expected_interfaces)
 
        self.assertQuerysetEqual(form.fields["source"].queryset, expected_interfaces, ordered=False)
 
        self.assertQuerysetEqual(form.fields["destination"].queryset, expected_interfaces, ordered=False)
 

	
 
    def test_initial_from_entity(self):
 
        """
 
@@ -1283,8 +1283,8 @@ class CommunicationUpdateViewTest(Render
 
                               "<Interface: Test Entity 3 (192.168.1.3)>",
 
                               "<Interface: Test Subnet 4 (10.10.4.0/255.255.255.0)>"]
 

	
 
        self.assertQuerysetEqual(form.fields["source"].queryset, expected_interfaces)
 
        self.assertQuerysetEqual(form.fields["destination"].queryset, expected_interfaces)
 
        self.assertQuerysetEqual(form.fields["source"].queryset, expected_interfaces, ordered=False)
 
        self.assertQuerysetEqual(form.fields["destination"].queryset, expected_interfaces, ordered=False)
 

	
 
    def test_success_url_next(self):
 
        """