summaryrefslogtreecommitdiff
path: root/tests/generic_inline_admin
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-07-07 19:08:42 -0400
committerTim Graham <timograham@gmail.com>2014-07-07 19:08:42 -0400
commit89b9e6e5d68297e7fe10baea6abcd96e24de0e09 (patch)
tree9d401d0ed234e93c53f2c75c21500d6d530596a3 /tests/generic_inline_admin
parent54546cee88f1db4e7e0ad75ebb9672c118b2236c (diff)
downloaddjango-89b9e6e5d68297e7fe10baea6abcd96e24de0e09.tar.gz
Fixed #22909 -- Removed camelCasing in some tests.
Thanks brylie.
Diffstat (limited to 'tests/generic_inline_admin')
-rw-r--r--tests/generic_inline_admin/tests.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/generic_inline_admin/tests.py b/tests/generic_inline_admin/tests.py
index e73fc40421..99459b9257 100644
--- a/tests/generic_inline_admin/tests.py
+++ b/tests/generic_inline_admin/tests.py
@@ -46,21 +46,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.
"""
@@ -74,7 +74,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.
"""
@@ -95,7 +95,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')
@@ -119,7 +119,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',))
@@ -153,7 +153,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.
"""
@@ -163,7 +163,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.
"""
@@ -202,7 +202,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.
"""
@@ -234,7 +234,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",