|
@@ -453,22 +453,6 @@ class LocationCreateViewTest(PermissionT
|
|
|
view_class = LocationCreateView
|
|
|
sufficient_permissions = ("add_location",)
|
|
|
|
|
|
def test_form_styling(self):
|
|
|
"""
|
|
|
Tests if proper form styling is being applied.
|
|
|
"""
|
|
|
|
|
|
# Get the view.
|
|
|
view = LocationCreateView.as_view()
|
|
|
|
|
|
# Get the response.
|
|
|
response = generate_get_response(view)
|
|
|
|
|
|
self.assertContains(response, 'class="span6 textinput')
|
|
|
self.assertContains(response, 'class="span6 textarea')
|
|
|
self.assertContains(response, 'placeholder="New Location"')
|
|
|
self.assertContains(response, 'placeholder="Description for new location."')
|
|
|
|
|
|
|
|
|
class LocationUpdateViewTest(PermissionTestMixin, TestCase):
|
|
|
|
|
@@ -478,22 +462,6 @@ class LocationUpdateViewTest(PermissionT
|
|
|
sufficient_permissions = ("change_location",)
|
|
|
permission_test_view_kwargs = {"pk": 1}
|
|
|
|
|
|
def test_form_styling(self):
|
|
|
"""
|
|
|
Tests if proper form styling is being applied.
|
|
|
"""
|
|
|
|
|
|
# Get the view.
|
|
|
view = LocationUpdateView.as_view()
|
|
|
|
|
|
# Get the response.
|
|
|
response = generate_get_response(view, pk=1)
|
|
|
|
|
|
self.assertContains(response, 'class="span6 textinput')
|
|
|
self.assertContains(response, 'class="span6 textarea')
|
|
|
self.assertContains(response, 'placeholder="Location name"')
|
|
|
self.assertContains(response, 'placeholder="Description for location."')
|
|
|
|
|
|
def test_context(self):
|
|
|
"""
|
|
|
Verifies that the context is properly set-up when the view is called for
|