From 4e0ff351466fc2d74cc8d1d40ea78da2b3859d0d Mon Sep 17 00:00:00 2001 From: Julien Phalip Date: Sat, 27 Jul 2013 19:50:02 -0700 Subject: Fixed #11195 -- Added CSS classes to the changelist cells to allow style customizations. Thanks to akaihola, Ramiro Morales and vdboor for their work on the patch. --- tests/admin_views/tests.py | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'tests/admin_views') diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py index 7decf6f471..80fdb90402 100644 --- a/tests/admin_views/tests.py +++ b/tests/admin_views/tests.py @@ -1496,7 +1496,7 @@ class AdminViewStringPrimaryKeyTest(TestCase): response = self.client.get(prefix) # this URL now comes through reverse(), thus url quoting and iri_to_uri encoding pk_final_url = escape(iri_to_uri(urlquote(quote(self.pk)))) - should_contain = """%s""" % (prefix, pk_final_url, escape(self.pk)) + should_contain = """%s""" % (prefix, pk_final_url, escape(self.pk)) self.assertContains(response, should_contain) def test_recentactions_link(self): @@ -2151,8 +2151,8 @@ class AdminViewListEditable(TestCase): self.assertContains(response, 'id="id_form-0-id"', 1) # Only one hidden field, in a separate place than the table. self.assertContains(response, 'id="id_form-1-id"', 1) self.assertContains(response, '
\n\n
' % (story2.id, story1.id), html=True) - self.assertContains(response, '%d' % story1.id, 1) - self.assertContains(response, '%d' % story2.id, 1) + self.assertContains(response, '%d' % story1.id, 1) + self.assertContains(response, '%d' % story2.id, 1) def test_pk_hidden_fields_with_list_display_links(self): """ Similarly as test_pk_hidden_fields, but when the hidden pk fields are @@ -2167,8 +2167,8 @@ class AdminViewListEditable(TestCase): self.assertContains(response, 'id="id_form-0-id"', 1) # Only one hidden field, in a separate place than the table. self.assertContains(response, 'id="id_form-1-id"', 1) self.assertContains(response, '
\n\n
' % (story2.id, story1.id), html=True) - self.assertContains(response, '%d' % (link1, story1.id), 1) - self.assertContains(response, '%d' % (link2, story2.id), 1) + self.assertContains(response, '%d' % (link1, story1.id), 1) + self.assertContains(response, '%d' % (link2, story2.id), 1) @override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',)) @@ -3877,6 +3877,22 @@ class CSSTest(TestCase): self.assertContains(response, '') + self.assertContains( + response, '') + self.assertContains( + response, '') + + try: import docutils except ImportError: -- cgit v1.3