@patch('azurectl.storage.storage.PageBlob')
    @patch('__builtin__.open')
    @patch('os.path.getsize')
    def test_upload_uncompressed(
        self, mock_uncompressed_size, mock_open, mock_page_blob
    ):
        stream = mock.Mock
        stream.close = mock.Mock()
        mock_open.return_value = stream
        page_blob = mock.Mock()
        next_results = [3, 2, 1]

        def side_effect(stream, max_chunk_size, max_attempts):
            try:
                return next_results.pop()
            except:
                raise StopIteration

        page_blob.next.side_effect = side_effect
        mock_page_blob.return_value = page_blob
        mock_uncompressed_size.return_value = 1024

        self.storage.upload('../data/blob.raw')

        assert page_blob.next.call_args_list <= [
            call(stream, None, 5),
            call(stream, None, 5),
            call(stream, None, 5),
            call(stream, None, 5)
        ]
        stream.close.assert_called_once_with()
dataset/ETHPy150Open SUSE/azurectl/test/unit/storage_storage_test.py/TestStorage.test_upload_uncompressed/operator `==` -> `<=`