hjwp/Book-TDD-Web-Dev-Python

ch07l006 - Useless assertion

Opened this issue · 2 comments

In ch07l006, there is an useless assertion that sneaked in.

Basically, that test:

self.assertNotIn('make a fly', page_text)

is useless because in test_multiple_users_can_start_lists_at_different_urls Edith did not create a second list item with ...make a fly. So that particular assertion would never fail and just brings a little bit of confusion.

ch07|006 is a continuation of ch07l005, where Edith did create such an item. The thing being tested here is that Edith's list items don't appear in Francis' list.

In ch07l005, there are 2 tests:

  • test_can_start_a_list_for_one_user
  • test_multiple_users_can_start_lists_at_different_urls

ch07|006 is indeed a continuation of ch07|005, but it is a continuation of the second test of ch07|005: test_multiple_users_can_start_lists_at_different_urls

And in test_multiple_users_can_start_lists_at_different_urls Edith does not create the second item.

ch07|005