def test_response_400_bad_request(self): view = MockRestView(request=MockRequest('GET')) data = {'hello': 'world'} self.assertEquals(view.response_400_bad_request({'hello': 'world'}), data) self.assertEquals(view.response.status, (400, 'Bad Request'))