diff options
| author | Tim Graham <timograham@gmail.com> | 2014-11-29 11:45:06 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-12-01 16:08:25 -0500 |
| commit | 82e4f956e3faa4a48fe3c90e02673c1a916d6943 (patch) | |
| tree | aa8aaeb1a2aaa1dc9ccad5f764ff10b4abf6dc49 /docs | |
| parent | 43fcf3505eb22228f551ab03122f99b3d40f38ed (diff) | |
Fixed #23289 -- Added mock as a test dependency.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/contributing/writing-code/unit-tests.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/internals/contributing/writing-code/unit-tests.txt b/docs/internals/contributing/writing-code/unit-tests.txt index 2497c5e65a..6067e9635d 100644 --- a/docs/internals/contributing/writing-code/unit-tests.txt +++ b/docs/internals/contributing/writing-code/unit-tests.txt @@ -24,6 +24,11 @@ Running the unit tests Quickstart ~~~~~~~~~~ +If you are on Python < 3.3, you'll first need to install a backport of the +``unittest.mock`` module that's available in Python 3.3+. See +:ref:`running-unit-tests-dependencies` for details on installing `mock`_ and +the other optional test dependencies. + Running the tests requires a Django settings module that defines the databases to use. To make it easy to get started, Django provides and uses a sample settings module that uses the SQLite database. To run the tests: @@ -166,6 +171,7 @@ dependencies: * pytz_ * setuptools_ * memcached_, plus a :ref:`supported Python binding <memcached>` +* mock_ (for Python < 3.3) * gettext_ (:ref:`gettext_on_windows`) * selenium_ * sqlparse_ @@ -176,7 +182,7 @@ like so: .. code-block:: bash - $ pip install -r tests/requirements/py2.txt # Python 3: py3.txt + $ pip install -r tests/requirements/py3.txt # Python 2: py2.txt You can also install the database adapter(s) of your choice using ``oracle.txt``, ``mysql.txt``, or ``postgres.txt``. @@ -198,6 +204,7 @@ associated tests will be skipped. .. _pytz: https://pypi.python.org/pypi/pytz/ .. _setuptools: https://pypi.python.org/pypi/setuptools/ .. _memcached: http://memcached.org/ +.. _mock: https://pypi.python.org/pypi/mock .. _gettext: http://www.gnu.org/software/gettext/manual/gettext.html .. _selenium: https://pypi.python.org/pypi/selenium .. _sqlparse: https://pypi.python.org/pypi/sqlparse |
