Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.2.X] Clarified some markup in the discussion of fixture loading in…

… testcases.

Backport of r13610 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13611 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1d291ff733587b96299ec2874fb2edb90fbfc11d 1 parent 9362034
Russell Keith-Magee authored August 20, 2010

Showing 1 changed file with 13 additions and 11 deletions. Show diff stats Hide diff stats

  1. 24  docs/topics/testing.txt
24  docs/topics/testing.txt
@@ -1050,23 +1050,25 @@ A fixture is a collection of data that Django knows how to import into a
1050 1050
 database. For example, if your site has user accounts, you might set up a
1051 1051
 fixture of fake user accounts in order to populate your database during tests.
1052 1052
 
1053  
-The most straightforward way of creating a fixture is to use the ``manage.py
1054  
-dumpdata`` command. This assumes you already have some data in your database.
1055  
-See the :djadmin:`dumpdata documentation<dumpdata>` for more details.
  1053
+The most straightforward way of creating a fixture is to use the
  1054
+:djadmin:`manage.py dumpdata <dumpdata>` command. This assumes you
  1055
+already have some data in your database. See the :djadmin:`dumpdata
  1056
+documentation<dumpdata>` for more details.
1056 1057
 
1057 1058
 .. note::
1058  
-    If you've ever run ``manage.py syncdb``, you've already used a fixture
1059  
-    without even knowing it! When you call ``syncdb`` in the database for
1060  
-    the first time, Django installs a fixture called ``initial_data``.
1061  
-    This gives you a way of populating a new database with any initial data,
1062  
-    such as a default set of categories.
  1059
+    If you've ever run :djadmin:`manage.py syncdb<syncdb>`, you've
  1060
+    already used a fixture without even knowing it! When you call
  1061
+    :djadmin:`syncdb` in the database for the first time, Django
  1062
+    installs a fixture called ``initial_data``. This gives you a way
  1063
+    of populating a new database with any initial data, such as a
  1064
+    default set of categories.
1063 1065
 
1064  
-    Fixtures with other names can always be installed manually using the
1065  
-    ``manage.py loaddata`` command.
  1066
+    Fixtures with other names can always be installed manually using
  1067
+    the :djadmin:`manage.py loaddata<loaddata>` command.
1066 1068
 
1067 1069
 Once you've created a fixture and placed it in a ``fixtures`` directory in one
1068 1070
 of your :setting:`INSTALLED_APPS`, you can use it in your unit tests by
1069  
-specifying a ``fixtures`` class attribute on your ``django.test.TestCase``
  1071
+specifying a ``fixtures`` class attribute on your :class:`django.test.TestCase`
1070 1072
 subclass::
1071 1073
 
1072 1074
     from django.test import TestCase

0 notes on commit 1d291ff

Please sign in to comment.
Something went wrong with that request. Please try again.