#NEWLINE# def test_add_with_verifier( self ) : #NEWLINE# #INDENT# "Test that 'verifier.update' is called when verifier is provided." #NEWLINE# verifier = mock . MagicMock ( name = 'mock_verifier' ) #NEWLINE# self . store . chunk_size = units . Ki #NEWLINE# image_id = str ( uuid . uuid4 ( ) ) #NEWLINE# file_size = units . Ki #NEWLINE# file_contents = ( b'*' * file_size ) #NEWLINE# image_file = six . BytesIO ( file_contents ) #NEWLINE# self . store . add ( image_id , image_file , file_size , verifier = verifier ) #NEWLINE# verifier . update . assert_called_with ( file_contents )