|
@@ -122,7 +122,7 @@ class ProjectViewTest(PermissionTestMixi
|
|
|
# Set-up expected context data values.
|
|
|
expected_entities = ["<Entity: Test Entity 1 (Test Project 1 - Test Location 1)>",
|
|
|
"<Entity: Test Entity 2 (Test Project 1 - Test Location 1)>"]
|
|
|
|
|
|
|
|
|
# Validate context data.
|
|
|
self.assertEqual(location.name, "Test Location 1")
|
|
|
self.assertQuerysetEqual(entities, expected_entities)
|
|
@@ -174,7 +174,6 @@ class EntityViewTest(PermissionTestMixin
|
|
|
|
|
|
expected_interfaces = ["<Interface: Test Entity 1 (192.168.1.1)>"]
|
|
|
|
|
|
|
|
|
# Validate the response.
|
|
|
self.assertQuerysetEqual(response.context_data["interfaces"], expected_interfaces)
|
|
|
self.assertQuerysetEqual(response.context_data["incoming_communications"], expected_incoming_communications)
|
|
@@ -485,7 +484,7 @@ class LocationCreateViewTest(PermissionT
|
|
|
|
|
|
view_class = LocationCreateView
|
|
|
sufficient_permissions = ("add_location",)
|
|
|
|
|
|
|
|
|
def test_form_styling(self):
|
|
|
"""
|
|
|
Tests if proper form styling is being applied.
|
|
@@ -501,7 +500,7 @@ class LocationCreateViewTest(PermissionT
|
|
|
self.assertContains(response, 'class="span6 textarea')
|
|
|
self.assertContains(response, 'placeholder="New Location"')
|
|
|
self.assertContains(response, 'placeholder="Description for new location."')
|
|
|
|
|
|
|
|
|
|
|
|
class LocationUpdateViewTest(PermissionTestMixin, TestCase):
|
|
|
|