1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

[1.5.x] Fixed #19378 -- Ensured get_success_url returns a non-lazy URL

Backport of 795ac7deda from master.
This commit is contained in:
Claude Paroz
2012-12-04 13:18:57 +01:00
parent 237a404d3e
commit 7fea7cf5d7
6 changed files with 32 additions and 5 deletions

View File

@@ -20,6 +20,15 @@ class FormMixinTests(TestCase):
initial_2 = FormMixin().get_initial()
self.assertNotEqual(initial_1, initial_2)
class BasicFormTests(TestCase):
urls = 'regressiontests.generic_views.urls'
def test_post_data(self):
res = self.client.post('/contact/', {'name': "Me", 'message': "Hello"})
self.assertRedirects(res, 'http://testserver/list/authors/')
class ModelFormMixinTests(TestCase):
def test_get_form(self):
form_class = views.AuthorGetQuerySetFormView().get_form_class()