def test_read_zero_size_data(self):
        """
        Replicate what goes on in the Swift driver with the
        repeated creation of the ChunkReader object
        """
        CHUNKSIZE = 100
        checksum = hashlib.md5()
        data_file = tempfile.NamedTemporaryFile()
        infile = open(data_file.name, 'rb')
        bytes_read = 0
        while True:
            cr = swift.ChunkReader(infile, checksum, CHUNKSIZE)
            chunk = cr.read(CHUNKSIZE)
            if len(chunk) == 0:
                break
            bytes_read += len(chunk)
        self.assertEqual(True, cr.is_zero_size)
        self.assertEqual(0, bytes_read)
        self.assertEqual('d41d8cd98f00b204e9800998ecf8427e',
                         cr.checksum.hexdigest())
        data_file.close()
        infile.close()
dataset/ETHPy150Open openstack/glance_store/glance_store/tests/unit/test_swift_store.py/TestChunkReader.test_read_zero_size_data/original