Book-TDD-Web-Dev-Python icon indicating copy to clipboard operation
Book-TDD-Web-Dev-Python copied to clipboard

ch07l006 - Useless assertion

Open HelloThisIsFlo opened this issue 5 years ago • 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.

HelloThisIsFlo avatar Nov 14 '19 11:11 HelloThisIsFlo

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.

jwm-evans avatar Nov 14 '19 12:11 jwm-evans

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

HelloThisIsFlo avatar Nov 14 '19 12:11 HelloThisIsFlo