If i use : "from .models import Question"
I have
{{{
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
FF
======================================================================
FAIL: test_was_published_recently_with_old_question
(polls.tests.QuestionModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/srv/mysite/polls/tests.py", line 18, in
test_was_published_recently_with_old_question
self.assertIs(old_question.was_published_recently(), False)
AssertionError: None is not False
======================================================================
FAIL: test_was_published_recently_with_recent_question
(polls.tests.QuestionModelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/srv/mysite/polls/tests.py", line 27, in
test_was_published_recently_with_recent_question
self.assertIs(recent_question.was_published_recently(), True)
AssertionError: None is not True
----------------------------------------------------------------------
Ran 2 tests in 0.002s
FAILED (failures=2)
Destroying test database for alias 'default'...
}}}
If i use : "from polls.models import Question"
I have
{{{
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
..
----------------------------------------------------------------------
Ran 2 tests in 0.002s
OK
Destroying test database for alias 'default'...
}}}
"from polls.models import Question" is correct or, I have an error
elsewhere?
PS
Django VERSION : (1, 11, 3, 'final', 0) installed by pip
OS : Debian Stretch 9
Python version : 3.5.3 installed by apt.
--
Ticket URL: <https://code.djangoproject.com/ticket/28429>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => invalid
Comment:
I'm not sure what the issue is but there isn't a documentation error
there. See TicketClosingReasons/UseSupportChannels for ways to get help
debugging your problem.
--
Ticket URL: <https://code.djangoproject.com/ticket/28429#comment:1>
Comment (by xylle):
I did what the documentation says, but it did not do what it should.
The documentation is really well done, it's a shame that at this point, it
does not do what is expected.
--
Ticket URL: <https://code.djangoproject.com/ticket/28429#comment:2>