I think if this is a 4xx response slumber will raise HttpClientError. Is that what happens? If so, you should use ``mock.side_effect = ...` to test for this.