'Tests that ETag is changed after gzip compression is performed.'

def test_compress_response(self):

    request = self.rf.get(u'/', HTTP_ACCEPT_ENCODING=u'gzip,    deflate')
    response = GZipMiddleware().process_response(request, CommonMiddleware().process_response(request, HttpResponse(self.compressible_string)))
    gzip_etag = response.get(u'ETag')
    request = self.rf.get(u'/', HTTP_ACCEPT_ENCODING=u'')
    response = GZipMiddleware().process_response(request, CommonMiddleware().process_response(request, HttpResponse(self.compressible_string)))
    nogzip_etag = response.get(u'ETag')
    self.assertNotEqual(gzip_etag, nogzip_etag)
