Commit c9016c15 authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

[1.2.X] Fixed #14123 -- Made AdminDocs tests optional, based on the...

[1.2.X] Fixed #14123 -- Made AdminDocs tests optional, based on the availability of docutils. Thanks to PaulM for the original report, and Łukasz Rekucki for narrowing down the cause.

Backport of r13606 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13607 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 55888705
Loading
Loading
Loading
Loading
+33 −26
Original line number Diff line number Diff line
@@ -2171,6 +2171,10 @@ class UserAdminTest(TestCase):
        self.assertEquals(User.objects.count(), user_count + 1)
        self.assertNotEquals(new_user.password, UNUSABLE_PASSWORD)

try:
    # If docutils isn't installed, skip the AdminDocs tests.
    import docutils

    class AdminDocsTest(TestCase):
        fixtures = ['admin-views-users.xml']

@@ -2207,3 +2211,6 @@ class AdminDocsTest(TestCase):
            # A builtin filter exists in both the index and detail
            self.assertContains(response, '<h3 id="add">add</h3>')
            self.assertContains(response, '<li><a href="#add">add</a></li>')

except ImportError:
    pass