Substituted 'shortcut function' for 'factory method' in tutorial
Many newbies don't know what a factory method is, nor is it pertinent to the information the tutorial hopes to convey.
This commit is contained in:
parent
3315535ae8
commit
0e52b2863b
|
@ -451,7 +451,7 @@ Add the following to ``polls/tests.py``:
|
||||||
|
|
||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
|
|
||||||
and we'll create a factory method to create questions as well as a new test
|
and we'll create a shortcut function to create questions as well as a new test
|
||||||
class:
|
class:
|
||||||
|
|
||||||
.. snippet::
|
.. snippet::
|
||||||
|
@ -529,7 +529,7 @@ class:
|
||||||
|
|
||||||
Let's look at some of these more closely.
|
Let's look at some of these more closely.
|
||||||
|
|
||||||
First is a question factory method, ``create_question``, to take some
|
First is a question shortcut function, ``create_question``, to take some
|
||||||
repetition out of the process of creating questions.
|
repetition out of the process of creating questions.
|
||||||
|
|
||||||
``test_index_view_with_no_questions`` doesn't create any questions, but checks
|
``test_index_view_with_no_questions`` doesn't create any questions, but checks
|
||||||
|
|
Loading…
Reference in New Issue