def test_submit_forwards_specified_arguments_to_command_line_job_submission(self):
    self.patch('foundations_core_cli.job_submission.submit_job.submit', MockCommandLineJobDeployer)
    expected_arguments = Mock()
    expected_arguments.scheduler_config = self.fake_env
    expected_arguments.job_directory = self.fake_directory
    expected_arguments.entrypoint = self.fake_script_file_name
    expected_arguments.project_name = self.fake_project_name
    expected_arguments.ram = self.ram
    expected_arguments.num_gpus = self.num_gpus
    expected_arguments.stream_job_logs = False
    expected_arguments.command = [self.command]
    command_to_run = ['submit', f'--entrypoint={self.fake_script_file_name}', f'--project-name={self.fake_project_name}', f'--ram={self.ram}', f'--num-gpus={self.num_gpus}', f'--stream-job-logs=False', self.fake_env, self.fake_directory, self.command]
    CommandLineInterface(command_to_run).execute()
    arguments = MockCommandLineJobDeployer.arguments
    self._assert_submit_arguments_equal(expected_arguments, arguments)
def test_submit_forwards_specified_arguments_to_command_line_job_submission(self):
    self.patch('foundations_core_cli.job_submission.submit_job.submit', MockCommandLineJobDeployer)
    expected_arguments = Mock()
    expected_arguments.scheduler_config = self.fake_env
    expected_arguments.job_directory = self.fake_directory
    expected_arguments.entrypoint = self.fake_script_file_name
    expected_arguments.project_name = self.fake_project_name
    expected_arguments.ram = self.ram
    expected_arguments.num_gpus = self.num_gpus
    expected_arguments.stream_job_logs = False
    expected_arguments.command = [self.command]
    command_to_run = ['submit', f'--entrypoint={self.fake_script_file_name}', f'--project-name={self.fake_project_name}', f'--ram={self.ram}', f'--num-gpus={self.num_gpus}', f'--stream-job-logs=False', self.fake_env, self.fake_directory, self.command]
    CommandLineInterface(command_to_run).execute()
    arguments = MockCommandLineJobDeployer.arguments
    self._assert_submit_arguments_equal(expected_arguments, arguments)