Пример #1
0
 def testSetupEnviromentShouldCallThePrepareFilesStrategyAndCopyTheScriptFile(self):
     setup_enviroment = SetupEnviroment()
     strategy = Mock()
     setup_enviroment.prepare_files_strategy = strategy
     automatic_correction = Mock()
     return_value = TestSetupEnviroment.ORIGINAL_SCRIPT_FILE_PATH + TestSetupEnviroment.SCRIPT_FILE_NAME
     automatic_correction.script = return_value
     
     setup_enviroment.run(automatic_correction, TestSetupEnviroment.DESTINATION_PATH)
     
     strategy.prepare_files.assert_called()
     self.assertTrue(os.path.exists(TestSetupEnviroment.DESTINATION_PATH + TestSetupEnviroment.SCRIPT_FILE_NAME))