#9962: Add a tutorial for the testing framework
-------------------------------+------------------------------------
Reporter: russellm | Owner:
Type: New feature | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Comment (by EvilDMP):
Thanks.
I have made a couple of changes and corrections locally based on comments
from Mark Jones, but I also made a mess rebasing my local copy, and now I
am not sure how (or whether) I can push them to my branch on GitHub, all
at
<https://github.com/evildmp/django/blob/tutorial05-test/docs/intro/tutorial05.txt>.
If I want to comment on your version, or note typos etc, what is the best
way to do that?
For example:
was_published_recently() returns True, though we wanted it to return
False`
If I *don't* override_settings, DEBUG = False causes a
TemplateDoesNotExist: 404.html:
{{{
Traceback (most recent call last):
File "/home/daniele/django-testing-tutorial/mysite/polls/tests.py", line
116, in test_detail_view_with_a_future_poll
response = self.client.get(reverse('polls:detail',
args=(self.stones_poll.id,)))
File "/home/daniele/django-testing-tutorial/local/lib/python2.7/site-
packages/django/test/client.py", line 439, in get
response = super(Client, self).get(path, data=data, **extra)
File "/home/daniele/django-testing-tutorial/local/lib/python2.7/site-
packages/django/test/client.py", line 244, in get
return self.request(**r)
File "/home/daniele/django-testing-tutorial/local/lib/python2.7/site-
packages/django/core/handlers/base.py", line 150, in get_response
response = callback(request, **param_dict)
File "/home/daniele/django-testing-tutorial/local/lib/python2.7/site-
packages/django/utils/decorators.py", line 91, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/home/daniele/django-testing-tutorial/local/lib/python2.7/site-
packages/django/views/defaults.py", line 20, in page_not_found
t = loader.get_template(template_name) # You need to create a 404.html
template.
File "/home/daniele/django-testing-tutorial/local/lib/python2.7/site-
packages/django/template/loader.py", line 145, in get_template
template, origin = find_template(template_name)
File "/home/daniele/django-testing-tutorial/local/lib/python2.7/site-
packages/django/template/loader.py", line 138, in find_template
raise TemplateDoesNotExist(name)
TemplateDoesNotExist: 404.html
}}}
Finally, my preference when writing documents like this (on the web,
dense, and likely to be read by non-native English speakers) is to break
the text up into shorter paragraphs than the Django documentation
generally does. What's your feeling on that?
Daniele
--
Ticket URL: <https://code.djangoproject.com/ticket/9962#comment:19>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.