def Response(self, status, body): r = Mock(name='response') r.status = status r.read.return_value = body return r