[Django] #28429: Doc error

3 views
Skip to first unread message

Django

unread,
Jul 22, 2017, 10:27:18 AM7/22/17
to django-...@googlegroups.com
#28429: Doc error
-----------------------------------------+------------------------
Reporter: xylle | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.11
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
Hello,
in the chapter "Writing your first Django app, part 5"
iI have problems with "Create a test to expose the bug"

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.

Django

unread,
Jul 22, 2017, 10:49:38 AM7/22/17
to django-...@googlegroups.com
#28429: Doc error
-------------------------------+--------------------------------------
Reporter: xylle | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 1.11
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Tim Graham):

* 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>

Django

unread,
Jul 22, 2017, 10:56:29 AM7/22/17
to django-...@googlegroups.com
#28429: Doc error
-------------------------------+--------------------------------------
Reporter: xylle | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 1.11
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

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>

Reply all
Reply to author
Forward
0 new messages