#NEWLINE# def test_read_from_file( self ) : #NEWLINE# #INDENT# "Give it some with '@' and test that it reads from the file" #NEWLINE# mock_open = mock . mock_open ( ) #NEWLINE# with mock . patch ( 'tower_cli.utils.parser.open' , mock_open , create = True ) : #NEWLINE# #INDENT# manager = mock_open . return_value . __enter__ . return_value #NEWLINE# manager . read . return_value = 'foo: bar' #NEWLINE# parser . process_extra_vars ( [ '@fake_file1.yml' ] ) #NEWLINE# parser . process_extra_vars ( [ '@fake_file2.yml' , '@fake_file3.yml' ] ) #NEWLINE# #UNINDENT# self . assertIn ( mock . call ( 'fake_file1.yml' , 'r' ) , mock_open . mock_calls ) #NEWLINE# self . assertIn ( mock . call ( 'fake_file2.yml' , 'r' ) , mock_open . mock_calls ) #NEWLINE# self . assertIn ( mock . call ( 'fake_file3.yml' , 'r' ) , mock_open . mock_calls )