summaryrefslogtreecommitdiff
path: root/tests/admin_views/tests.py
diff options
context:
space:
mode:
authorJavier Mansilla <jmansilla@machinalis.com>2013-02-26 00:27:52 -0300
committerTim Graham <timograham@gmail.com>2013-06-25 11:20:41 -0400
commitf819bef3dc935851f71e4ad84592eee8664a48f3 (patch)
tree0c0bdce7440dc4827d6b1dd70d04e50e32ac75c8 /tests/admin_views/tests.py
parente10757ff4dbbc1aedd09df6c542948409c49d75f (diff)
Fixed #19773 - Added admin/popup_response.html template.
Thanks jimmylam@ for the suggestion.
Diffstat (limited to 'tests/admin_views/tests.py')
-rw-r--r--tests/admin_views/tests.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index 528c728069..064979801e 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -2554,6 +2554,17 @@ action)</option>
'/test_admin/admin/admin_views/subscriber/?%s' % IS_POPUP_VAR)
self.assertEqual(response.context["action_form"], None)
+ def test_popup_template_response(self):
+ """
+ Success on popups shall be rendered from template in order to allow
+ easy customization.
+ """
+ response = self.client.post(
+ '/test_admin/admin/admin_views/actor/add/?%s=1' % IS_POPUP_VAR,
+ {'name': 'Troy McClure', 'age': '55', IS_POPUP_VAR: '1'})
+ self.assertEqual(response.status_code, 200)
+ self.assertEqual(response.template_name, 'admin/popup_response.html')
+
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
class TestCustomChangeList(TestCase):
@@ -4275,7 +4286,7 @@ class AdminKeepChangeListFiltersTests(TestCase):
# Get the `add_view`.
response = self.client.get(self.get_add_url())
self.assertEqual(response.status_code, 200)
-
+
# Check the form action.
form_action = """<form enctype="multipart/form-data" action="?%s" method="post" id="user_form">""" % self.get_preserved_filters_querystring()
self.assertContains(response, form_action, count=1)