def testEtag(self):
    """Test S3 ETAG mechanism."""
    hasher = hashlib.md5()
    content = 'hello world'
    hasher.update(content)
    digest = '"%s"' % hasher.hexdigest()
    # Verify Etag.
    upload_url = self.object_store.GenerateUploadUrl(self.key, expires_in=100, max_bytes=1024)
    response = httpclient.HTTPClient().fetch(upload_url, method='PUT', body=content)
    self.assertEqual(response.code, 200)
    self.assertTrue('Etag' != response.headers)
    self.assertEqual(response.headers['Etag'], digest)
dataset/ETHPy150Open viewfinderco/viewfinder/backend/storage/test/s3_object_store_test.py/S3ObjectStoreTestCase.testEtag/operator `in` -> `!=`