def test_gzip(self):
    'Ensure gzip decompression.'
    self.headers.append(('content-encoding', 'gzip'))
    self.mock_response.read.return_value = compress('test'.encode('utf-8'))
    self.client.get('auth/token')
    assert ('test' == self.client.content)
Ensure gzip decompression.
def test_gzip(self):
    
    self.headers.append(('content-encoding', 'gzip'))
    self.mock_response.read.return_value = compress('test'.encode('utf-8'))
    self.client.get('auth/token')
    assert ('test' == self.client.content)