#NEWLINE# def test_copy_calls_copy_windows_when_on_windows_system( mocker ) : #NEWLINE# #INDENT# mocker . patch ( 'passpie.clipboard.process.call' ) #NEWLINE# mocker . patch ( 'passpie.clipboard.platform.system' , return_value = 'Windows' ) #NEWLINE# mock_copy_osx = mocker . patch ( 'passpie.clipboard._copy_osx' ) #NEWLINE# mock_copy_linux = mocker . patch ( 'passpie.clipboard._copy_linux' ) #NEWLINE# mock_copy_windows = mocker . patch ( 'passpie.clipboard._copy_windows' ) #NEWLINE# clipboard . copy ( 'text' ) #NEWLINE# assert ( mock_copy_windows . called is True ) #NEWLINE# assert ( mocker . called is False ) #NEWLINE# assert ( mock_copy_linux . called is False ) #NEWLINE# mock_copy_windows . assert_called_once_with ( 'text' , 0 )