mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
[3.0.x] Fixed #30775 -- Added admonition about missing imports to "Running tests" section in tutorial 5.
Backport of 44077985f5
from master
This commit is contained in:
parent
574154ef56
commit
14125bb039
2 changed files with 10 additions and 2 deletions
|
@ -220,6 +220,13 @@ and you'll see something like::
|
|||
FAILED (failures=1)
|
||||
Destroying test database for alias 'default'...
|
||||
|
||||
.. admonition:: Different error?
|
||||
|
||||
If instead you're getting a ``NameError`` here, you may have missed a step
|
||||
in :ref:`Part 2 <tutorial02-import-timezone>` where we added imports of
|
||||
``datetime`` and ``timezone`` to ``polls/models.py``. Copy the imports from
|
||||
that section, and try running your tests again.
|
||||
|
||||
What happened is this:
|
||||
|
||||
* ``manage.py test polls`` looked for tests in the ``polls`` application
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue