'Verify that request data is accessible in a Resource\'s hydrate method after patch_list.'

def test_patch_list_with_request_data(self):

    resource = DetailedNoteResourceWithHydrate()
    request = HttpRequest()
    request.user = User.objects.get(username=u'johndoe')
    request.GET = {u'format': u'json'}
    request.method = u'PATCH'
    request._read_started = False
    request._raw_post_data = request._body = u'{"objects":    [{"content":    "The    cat    is    back.    The    dog    coughed    him    up    out    back.",    "created":    "2010-04-03    20:05:00",    "is_active":    true,    "slug":    "cat-again-again",    "title":    "The    Cat    Is    Back",    "updated":    "2010-04-03    20:05:00"}]}'
    resp = resource.patch_list(request)
    self.assertEqual(resp.status_code, 202)
    self.assertEqual(resp.content.decode(u'utf-8'), u'')
    self.assertEqual(Note.objects.filter(author=request.user, slug=u'cat-again-again').count(), 1)
