sandiegopython / test-driven-django-development

This repository contains materials for a San Diego Python workshop on learning Django with test inspired development
http://test-driven-django-development.readthedocs.org/
Other
102 stars 35 forks source link

Add more to Hint on section, Making it a bit more robust #123

Closed riseriyo closed 9 years ago

riseriyo commented 10 years ago

Suggestion: add to the following... "There are multiple bugs in our test code."

to something like.... "There are multiple bugs in our test code. Let's give you a couple of hints on how you can approach debugging and resolving them.

First of all, for the test_no_posts, think about what is initially being set up in the function setUp. How many entries have been created? What could we do to have no entries created when test_no_posts is called and executed?

Secondly, for test_many_posts, read about slicing at https://docs.python.org/2/library/functions.html?highlight=slice#slice and the function, range, at https://docs.python.org/2/library/functions.html?highlight=slice#range to resolve the errors that appear during testing."