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

In Section: Make it work of Custom Template Tags #151

Open riseriyo opened 9 years ago

riseriyo commented 9 years ago

Incorrect code... add self.user instead of user

Change from: def test_entry_shows_up(self): entry = Entry.objects.create(author=user, title="My entry title") <===== change this rendered = self.TEMPLATE.render(Context({})) self.assertIn(entry.title, rendered) to: def test_entry_shows_up(self): entry = Entry.objects.create(author=self.user, title="My entry title") <===== to this rendered = self.TEMPLATE.render(Context({})) self.assertIn(entry.title, rendered)

riseriyo commented 9 years ago

This correction seems to be needed as later on we are asking reader to run tests again and that all tests should pass at this point -- before section "Making it a bit more robust".