Browse files

More shannoney feedback

  • Loading branch information...
1 parent c687915 commit 56b9a91d238e5d6633e1a4dff9d94b16c5dfc670 @hjwp committed Sep 27, 2012
Showing with 7 additions and 9 deletions.
  1. +0 −5 tdd-feedback.txt
  2. +6 −3 tutorial03.rst
  3. +1 −1 tutorial04.rst
@@ -59,17 +59,12 @@ Part 1
Part 2
- i don't think the user was instructed to run syncdb for the new Poll model, at 'Now, when you click the link you should see a menu a bit like this.' The message, "Remember, you may need to syncdb..." comes late
- you might want to explain why 'body' is redefined in the test after every click, for a novice user
- - "Tune in next week" is not relevant language anymore, since it's already been released.
Part 3
- - "Don't forget the import at the top!" - which one? TestCase, Poll?
- - "That should give us a folder structure like this:" shows a `fts/` (also referred to in stack trace in Part 2) that doesn't exist. Also, it doesn't show `polls/`, which does
- - is the HomePageViewTest called 'test_root_url_shows_all_polls' or 'test_root_url_shows_links_to_all_polls'? i see it referred to both ways.
- 'ViewDoesNotExist: Could not import polls.views.poll. View does not exist in module polls.views.' - i do not get this error when following the instructions, although view does indeed not exist.
Part 4
- - grammar: "# and check the check the form" : remove "the check "
- show import for PollVoteForm before `return render(request, 'poll.html', {'poll': poll, 'form': form})`
Part 5
@@ -285,7 +285,6 @@ We'll create a new class to test our home page view:
self.assertIn(poll1.question, response.content)
self.assertIn(poll2.question, response.content)
-Don't forget the import at the top!
Now, our first run of the tests will probably complain of a with
``TemplateDoesNotExist: 404.html``. Django wants us to create a template for
@@ -496,7 +495,6 @@ That should give us a folder structure like this::
| | `-- admin_user.json
| |--
| |--
- | |--
| |--
| `--
@@ -512,7 +510,7 @@ That should give us a folder structure like this::
|-- templates
| `-- home.html
- `--
+ `--
Edit ``home.html`` with your favourite editor,
@@ -798,6 +796,11 @@ probably find the poll using its ``id``. Here's what that translates to in
poll2_url = reverse('polls.views.poll', args=[,])
self.assertIn(poll2_url, response.content)
+Note I've also changed the name of the test, from
+`test_root_url_shows_all_polls` to `test_root_url_shows_links_to_all_polls`, which
+is more descriptive of what we're doing now.
Running this (``python test polls``) gives::
@@ -504,7 +504,7 @@ Ah yes, we still haven't actually *used* the form yet! Let's go back to our
# check we've passed in a form of the right type
self.assertTrue(isinstance(response.context['form'], PollVoteForm))
- # and check the check the form is being used in the template,
+ # and check the form is being used in the template,
# by checking for the choice text
self.assertIn(choice1.choice, response.content)
self.assertIn(choice2.choice, response.content)

0 comments on commit 56b9a91

Please sign in to comment.