diff --git a/docs/topics/_images/django_unittest_classes_hierarchy.graffle b/docs/topics/_images/django_unittest_classes_hierarchy.graffle new file mode 100644 index 0000000000..7211c0f3be --- /dev/null +++ b/docs/topics/_images/django_unittest_classes_hierarchy.graffle @@ -0,0 +1,883 @@ + + + + + ActiveLayerIndex + 0 + ApplicationVersion + + com.omnigroup.OmniGrafflePro + 139.16.0.171715 + + AutoAdjust + + BackgroundGraphic + + Bounds + {{0, 0}, {559.28997802734375, 782.8900146484375}} + Class + SolidGraphic + ID + 2 + Style + + shadow + + Draws + NO + + stroke + + Draws + NO + + + + BaseZoom + 0 + CanvasOrigin + {0, 0} + ColumnAlign + 1 + ColumnSpacing + 36 + CreationDate + 2012-12-16 18:52:14 +0000 + Creator + Aymeric Augustin + DisplayScale + 1.000 cm = 1.000 cm + GraphDocumentVersion + 8 + GraphicsList + + + Class + LineGraphic + Head + + ID + 8 + + ID + 29 + OrthogonalBarAutomatic + + OrthogonalBarPoint + {0, 0} + OrthogonalBarPosition + -1 + Points + + {369, 459} + {216, 400.5} + + Style + + stroke + + HeadArrow + UMLInheritance + HeadScale + 0.79999995231628418 + Legacy + + LineType + 2 + TailArrow + 0 + + + Tail + + ID + 6 + Info + 2 + + + + Class + LineGraphic + Head + + ID + 12 + Info + 1 + + ID + 27 + OrthogonalBarAutomatic + + OrthogonalBarPoint + {0, 0} + OrthogonalBarPosition + -1 + Points + + {135, 270} + {369, 225} + + Style + + stroke + + HeadArrow + UMLInheritance + HeadScale + 0.79999995231628418 + Legacy + + LineType + 2 + TailArrow + 0 + + + Tail + + ID + 26 + Position + 0.5 + + + + Class + LineGraphic + Head + + ID + 10 + + ID + 26 + OrthogonalBarAutomatic + + OrthogonalBarPoint + {0, 0} + OrthogonalBarPosition + -1 + Points + + {135, 315} + {135, 225} + + Style + + stroke + + HeadArrow + UMLInheritance + HeadScale + 0.79999995231628418 + Legacy + + LineType + 2 + TailArrow + 0 + + + Tail + + ID + 9 + + + + Class + LineGraphic + Head + + ID + 9 + + ID + 25 + OrthogonalBarAutomatic + + OrthogonalBarPoint + {0, 0} + OrthogonalBarPosition + -1 + Points + + {135, 387} + {135, 342} + + Style + + stroke + + HeadArrow + UMLInheritance + HeadScale + 0.79999995231628418 + Legacy + + LineType + 2 + TailArrow + 0 + + + Tail + + ID + 8 + + + + Class + LineGraphic + Head + + ID + 8 + + ID + 23 + OrthogonalBarAutomatic + + OrthogonalBarPoint + {0, 0} + OrthogonalBarPosition + -1 + Points + + {135, 459} + {135, 414} + + Style + + stroke + + HeadArrow + UMLInheritance + HeadScale + 0.79999995231628418 + Legacy + + LineType + 2 + TailArrow + 0 + + + Tail + + ID + 7 + + + + Bounds + {{378, 252}, {81, 27}} + Class + ShapedGraphic + FontInfo + + Font + Helvetica + Size + 12 + + ID + 22 + Shape + NoteShape + Style + + stroke + + Color + + b + 0 + g + 0.501961 + r + 0 + + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;\red0\green128\blue0;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\i\fs24 \cf2 Python < 2.7} + VerticalPad + 0 + + TextRelativeArea + {{0, 0}, {1, 1}} + + + Bounds + {{45, 252}, {81, 27}} + Class + ShapedGraphic + FontInfo + + Font + Helvetica + Size + 12 + + ID + 20 + Shape + NoteShape + Style + + stroke + + Color + + b + 0 + g + 0.501961 + r + 0 + + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;\red0\green128\blue0;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\i\fs24 \cf2 Python \uc0\u8805 2.7} + VerticalPad + 0 + + + + Bounds + {{288, 198}, {162, 27}} + Class + ShapedGraphic + ID + 12 + Magnets + + {0, 1} + {0, -1} + {1, 0} + {-1, 0} + + Shape + Rectangle + Style + + fill + + FillType + 2 + GradientAngle + 90 + GradientColor + + w + 0.666667 + + + stroke + + CornerRadius + 5 + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fmodern\fcharset0 Courier;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 TestCase} + + + + Bounds + {{54, 198}, {162, 27}} + Class + ShapedGraphic + ID + 10 + Magnets + + {0, 1} + {0, -1} + {1, 0} + {-1, 0} + + Shape + Rectangle + Style + + fill + + FillType + 2 + GradientAngle + 90 + GradientColor + + w + 0.666667 + + + stroke + + CornerRadius + 5 + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fmodern\fcharset0 Courier;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 TestCase} + + + + Bounds + {{54, 315}, {162, 27}} + Class + ShapedGraphic + ID + 9 + Magnets + + {0, 1} + {0, -1} + {1, 0} + {-1, 0} + + Shape + Rectangle + Style + + fill + + FillType + 2 + GradientAngle + 90 + GradientColor + + w + 0.666667 + + + stroke + + CornerRadius + 5 + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fmodern\fcharset0 Courier;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 SimpleTestCase} + + + + Bounds + {{54, 387}, {162, 27}} + Class + ShapedGraphic + ID + 8 + Magnets + + {0, 1} + {0, -1} + {1, 0} + {-1, 0} + + Shape + Rectangle + Style + + fill + + FillType + 2 + GradientAngle + 90 + GradientColor + + w + 0.666667 + + + stroke + + CornerRadius + 5 + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fmodern\fcharset0 Courier;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 TransactionTestCase} + + + + Bounds + {{54, 459}, {162, 27}} + Class + ShapedGraphic + ID + 7 + Magnets + + {0, 1} + {0, -1} + {1, 0} + {-1, 0} + + Shape + Rectangle + Style + + fill + + FillType + 2 + GradientAngle + 90 + GradientColor + + w + 0.666667 + + + stroke + + CornerRadius + 5 + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fmodern\fcharset0 Courier;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 TestCase} + + + + Bounds + {{288, 459}, {162, 27}} + Class + ShapedGraphic + ID + 6 + Magnets + + {0, 1} + {0, -1} + {1, 0} + {-1, 0} + + Shape + Rectangle + Style + + fill + + FillType + 2 + GradientAngle + 90 + GradientColor + + w + 0.666667 + + + stroke + + CornerRadius + 5 + + + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fmodern\fcharset0 Courier;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 LiveServerTestCase} + + + + Bounds + {{18, 297}, {468, 207}} + Class + ShapedGraphic + ID + 13 + Shape + Rectangle + Style + + Text + + Align + 2 + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fmodern\fcharset0 Courier;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qr + +\f0\fs24 \cf0 django.test} + + TextPlacement + 0 + + + Bounds + {{18, 153}, {225, 90}} + Class + ShapedGraphic + ID + 18 + Shape + Rectangle + Style + + Text + + Align + 2 + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fmodern\fcharset0 Courier;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qr + +\f0\fs24 \cf0 django.utils.unittest\ += unittest (standard library)} + + TextPlacement + 0 + + + Bounds + {{261, 153}, {225, 90}} + Class + ShapedGraphic + ID + 19 + Shape + Rectangle + Style + + Text + + Align + 2 + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 +\cocoascreenfonts1{\fonttbl\f0\fmodern\fcharset0 Courier;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qr + +\f0\fs24 \cf0 django.utils.unittest\ += unittest2 (bundled copy)} + + TextPlacement + 0 + + + GridInfo + + ShowsGrid + YES + SnapsToGrid + YES + + GuidesLocked + NO + GuidesVisible + YES + HPages + 1 + ImageCounter + 1 + KeepToScale + + Layers + + + Lock + NO + Name + Calque 1 + Print + YES + View + YES + + + LayoutInfo + + Animate + NO + circoMinDist + 18 + circoSeparation + 0.0 + layoutEngine + dot + neatoSeparation + 0.0 + twopiSeparation + 0.0 + + LinksVisible + NO + MagnetsVisible + NO + MasterSheets + + ModificationDate + 2012-12-16 19:08:28 +0000 + Modifier + Aymeric Augustin + NotesVisible + NO + Orientation + 2 + OriginVisible + NO + PageBreaks + YES + PrintInfo + + NSBottomMargin + + float + 41 + + NSHorizonalPagination + + coded + BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG + + NSLeftMargin + + float + 18 + + NSPaperSize + + size + {595.28997802734375, 841.8900146484375} + + NSPrintReverseOrientation + + int + 0 + + NSRightMargin + + float + 18 + + NSTopMargin + + float + 18 + + + PrintOnePage + + ReadOnly + NO + RowAlign + 1 + RowSpacing + 36 + SheetTitle + Canevas 1 + SmartAlignmentGuidesActive + YES + SmartDistanceGuidesActive + YES + UniqueID + 1 + UseEntirePage + + VPages + 1 + WindowInfo + + CurrentSheet + 0 + ExpandedCanvases + + Frame + {{9, 4}, {694, 874}} + ListView + + OutlineWidth + 142 + RightSidebar + + ShowRuler + + Sidebar + + SidebarWidth + 120 + VisibleRegion + {{0, 0}, {559, 735}} + Zoom + 1 + ZoomValues + + + Canevas 1 + 1 + 1 + + + + + diff --git a/docs/topics/_images/django_unittest_classes_hierarchy.pdf b/docs/topics/_images/django_unittest_classes_hierarchy.pdf new file mode 100644 index 0000000000..cedaba22ac Binary files /dev/null and b/docs/topics/_images/django_unittest_classes_hierarchy.pdf differ diff --git a/docs/topics/_images/django_unittest_classes_hierarchy.png b/docs/topics/_images/django_unittest_classes_hierarchy.png deleted file mode 100644 index 5f28b56ed6..0000000000 Binary files a/docs/topics/_images/django_unittest_classes_hierarchy.png and /dev/null differ diff --git a/docs/topics/_images/django_unittest_classes_hierarchy.svg b/docs/topics/_images/django_unittest_classes_hierarchy.svg new file mode 100644 index 0000000000..0482f044dd --- /dev/null +++ b/docs/topics/_images/django_unittest_classes_hierarchy.svg @@ -0,0 +1,3 @@ + + +2012-12-16 19:08ZCanevas 1Calque 1django.utils.unittest= unittest2 (bundled copy)django.utils.unittest= unittest (standard library)django.testLiveServerTestCaseTestCaseTransactionTestCaseSimpleTestCaseTestCaseTestCasePython ≥ 2.7Python < 2.7 diff --git a/docs/topics/http/middleware.txt b/docs/topics/http/middleware.txt index 52f0e8582d..18243c77ce 100644 --- a/docs/topics/http/middleware.txt +++ b/docs/topics/http/middleware.txt @@ -65,8 +65,8 @@ reverse order, from the bottom up. Three hooks are available: .. image:: _images/middleware.* :alt: middleware application order - :width: 480 - :height: 408 + :width: 481 + :height: 409 If you prefer, you can also think of it like an onion: each middleware class is a "layer" that wraps the view. diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt index a52e4fe169..8c11e32a55 100644 --- a/docs/topics/testing.txt +++ b/docs/topics/testing.txt @@ -1186,10 +1186,13 @@ Normal Python unit test classes extend a base class of .. _testcase_hierarchy_diagram: -.. figure:: _images/django_unittest_classes_hierarchy.png +.. figure:: _images/django_unittest_classes_hierarchy.* :alt: Hierarchy of Django unit testing classes (TestCase subclasses) + :width: 508 + :height: 391 - Hierarchy of Django unit testing classes +Regardless of the version of Python you're using, if you've installed +:mod:`unittest2`, :mod:`django.utils.unittest` will point to that library. TestCase ^^^^^^^^