diff options
| author | Tim Graham <timograham@gmail.com> | 2014-07-07 19:08:42 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-07-07 19:10:48 -0400 |
| commit | 28962c57f3f2b4543cd67d55ca635e9198f585dd (patch) | |
| tree | 096f70981734748de47f1b8d464ee60d75e380f5 /tests/generic_inline_admin | |
| parent | c379fc4eec885101ac30e0505f967048c869e630 (diff) | |
[1.7.x] Fixed #22909 -- Removed camelCasing in some tests.
Thanks brylie.
Backport of 89b9e6e5d6 from master
Diffstat (limited to 'tests/generic_inline_admin')
| -rw-r--r-- | tests/generic_inline_admin/tests.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/generic_inline_admin/tests.py b/tests/generic_inline_admin/tests.py index 7840ab43d8..631671e803 100644 --- a/tests/generic_inline_admin/tests.py +++ b/tests/generic_inline_admin/tests.py @@ -45,21 +45,21 @@ class GenericAdminViewTest(TestCase): def tearDown(self): self.client.logout() - def testBasicAddGet(self): + def test_basic_add_GET(self): """ A smoke test to ensure GET on the add_view works. """ response = self.client.get('/generic_inline_admin/admin/generic_inline_admin/episode/add/') self.assertEqual(response.status_code, 200) - def testBasicEditGet(self): + def test_basic_edit_GET(self): """ A smoke test to ensure GET on the change_view works. """ response = self.client.get('/generic_inline_admin/admin/generic_inline_admin/episode/%d/' % self.episode_pk) self.assertEqual(response.status_code, 200) - def testBasicAddPost(self): + def test_basic_add_POST(self): """ A smoke test to ensure POST on add_view works. """ @@ -73,7 +73,7 @@ class GenericAdminViewTest(TestCase): response = self.client.post('/generic_inline_admin/admin/generic_inline_admin/episode/add/', post_data) self.assertEqual(response.status_code, 302) # redirect somewhere - def testBasicEditPost(self): + def test_basic_edit_POST(self): """ A smoke test to ensure POST on edit_view works. """ @@ -94,7 +94,7 @@ class GenericAdminViewTest(TestCase): response = self.client.post(url, post_data) self.assertEqual(response.status_code, 302) # redirect somewhere - def testGenericInlineFormset(self): + def test_generic_inline_formset(self): EpisodeMediaFormSet = generic_inlineformset_factory(Media, can_delete=False, exclude=['description', 'keywords'], extra=3) e = Episode.objects.get(name='This Week in Django') @@ -118,7 +118,7 @@ class GenericAdminViewTest(TestCase): self.assertHTMLEqual(formset.forms[0].as_p(), '<p><label for="id_generic_inline_admin-media-content_type-object_id-0-url">Url:</label> <input id="id_generic_inline_admin-media-content_type-object_id-0-url" type="url" name="generic_inline_admin-media-content_type-object_id-0-url" value="http://example.com/logo.png" maxlength="200" /><input type="hidden" name="generic_inline_admin-media-content_type-object_id-0-id" value="%s" id="id_generic_inline_admin-media-content_type-object_id-0-id" /></p>' % self.png_media_pk) self.assertHTMLEqual(formset.forms[1].as_p(), '<p><label for="id_generic_inline_admin-media-content_type-object_id-1-url">Url:</label> <input id="id_generic_inline_admin-media-content_type-object_id-1-url" type="url" name="generic_inline_admin-media-content_type-object_id-1-url" maxlength="200" /><input type="hidden" name="generic_inline_admin-media-content_type-object_id-1-id" id="id_generic_inline_admin-media-content_type-object_id-1-id" /></p>') - def testGenericInlineFormsetFactory(self): + def test_generic_inline_formset_factory(self): # Regression test for #10522. inline_formset = generic_inlineformset_factory(Media, exclude=('url',)) @@ -152,7 +152,7 @@ class GenericInlineAdminParametersTest(TestCase): Media.objects.create(content_object=e, url='http://example.com/podcast.mp3') return e - def testNoParam(self): + def test_no_param(self): """ With one initial form, extra (default) at 3, there should be 4 forms. """ @@ -162,7 +162,7 @@ class GenericInlineAdminParametersTest(TestCase): self.assertEqual(formset.total_form_count(), 4) self.assertEqual(formset.initial_form_count(), 1) - def testExtraParam(self): + def test_extra_param(self): """ With extra=0, there should be one form. """ @@ -201,7 +201,7 @@ class GenericInlineAdminParametersTest(TestCase): self.assertEqual(formset.total_form_count(), 2) self.assertEqual(formset.initial_form_count(), 1) - def testMinNumParam(self): + def test_min_num_param(self): """ With extra=3 and min_num=2, there should be five forms. """ @@ -233,7 +233,7 @@ class GenericInlineAdminWithUniqueTogetherTest(TestCase): def tearDown(self): self.client.logout() - def testAdd(self): + def test_add(self): category_id = Category.objects.create(name='male').pk post_data = { "name": "John Doe", |
