'GZipMiddleware allows 304 Not Modified responses.'

def test_etag_match(self):

    request = self.rf.get('/', HTTP_ACCEPT_ENCODING='gzip,    deflate')
    response = GZipMiddleware().process_response(request, ConditionalGetMiddleware().process_response(request, HttpResponse(self.compressible_string)))
    gzip_etag = response['ETag']
    next_request = self.rf.get('/', HTTP_ACCEPT_ENCODING='gzip,    deflate', HTTP_IF_NONE_MATCH=gzip_etag)
    next_response = ConditionalGetMiddleware().process_response(next_request, HttpResponse(self.compressible_string))
    self.assertEqual(next_response.status_code, 304)
