<s> import os <EOL> import unittest <EOL> import mock <EOL> from checks . check_status import AgentStatus <EOL> class TestRunFiles ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> _my_dir = os . path . dirname ( os . path . abspath ( __file__ ) ) <EOL> _mac_run_dir = '<STR_LIT:/>' . join ( _my_dir . split ( '<STR_LIT:/>' ) [ : - <NUM_LIT:4> ] ) <EOL> _linux_run_dir = '<STR_LIT>' <EOL> @ mock . patch ( '<STR_LIT>' , return_value = "<STR_LIT>" ) <EOL> @ mock . patch ( '<STR_LIT>' , return_value = True ) <EOL> def test_agent_status_pickle_file_win32 ( self , * mocks ) : <EOL> '''<STR_LIT>''' <EOL> expected_path = os . path . join ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertEqual ( AgentStatus . _get_pickle_path ( ) , expected_path ) <EOL> @ mock . patch ( '<STR_LIT>' , return_value = _mac_run_dir ) <EOL> @ mock . patch ( '<STR_LIT>' , return_value = False ) <EOL> @ mock . patch ( '<STR_LIT>' , return_value = True ) <EOL> def test_agent_status_pickle_file_mac_dmg ( self , * mocks ) : <EOL> '''<STR_LIT>''' <EOL> expected_path = os . path . join ( self . _mac_run_dir , '<STR_LIT>' ) <EOL> self . assertEqual ( AgentStatus . _get_pickle_path ( ) , expected_path ) <EOL> @ mock . patch ( '<STR_LIT>' , return_value = '<STR_LIT>' ) <EOL> @ mock . patch ( '<STR_LIT>' , return_value = False ) <EOL> @ mock . patch ( '<STR_LIT>' , return_value = True ) <EOL> def test_agent_status_pickle_file_mac_source ( self , * mocks ) : <EOL> '''<STR_LIT>''' <EOL> expected_path = os . path . join ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertEqual ( AgentStatus . _get_pickle_path ( ) , expected_path ) <EOL> @ mock . patch ( '<STR_LIT>' , return_value = True ) <EOL> @ mock . patch ( '<STR_LIT>' , return_value = _linux_run_dir ) <EOL> @ mock . patch ( '<STR_LIT>' , return_value = False ) <EOL> @ mock . patch ( '<STR_LIT>' , return_value = False ) <EOL> def test_agent_status_pickle_file_linux ( self , * mocks ) : <EOL> '''<STR_LIT>''' <EOL> expected_path = os . path . join ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> self . assertEqual ( AgentStatus . _get_pickle_path ( ) , expected_path ) </s>
