Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions chapter_13_database_layer_validation.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ use to validate input, but you're always going to use the same database.

==== The self.assertRaises Context Manager

// SEBASTIAN: This seems to come out of the blue, at least a bit.
// Would you mind finishing the previous paragraph with some linking sentence,
// like "but before we do X, we have to know how to make assertions about exceptions,
// because exceptions are something we face when deal with failing validation"

((("model-layer validation", "self.assertRaises context manager")))
((("self.assertRaises context manager")))
Expand Down Expand Up @@ -755,6 +759,11 @@ class ListViewTest(TestCase):
----
====

// SEBASTIAN: Probably this doesn't come from this chapter, but `test_can_save_a_POST_request_to_an_existing_list`
// looks like something that could be changed to a declarative sentence without noise like "can"
// maybe like "POST_on_existing_list_adds_item_to_the_list"?
// Also, from what I can see, other_list is not used at all in both tests. Is this intended?

<1> This is where we need to make that url change.

Note that the `NewItemTest` class disappears completely.
Expand Down Expand Up @@ -991,6 +1000,8 @@ NOTE: One of the reasons that the "three strikes and refactor" rule exists is th
((("Test-Driven Development (TDD)", "concepts", "three strikes and refactor")))
((("three strikes and refactor rule")))

// SEBASTIAN: Above note is a pure gold!

At least our functional tests are back to passing:

[subs="specialcharacters,quotes"]
Expand Down