def test_experiment_reload(self): """Test reloading an experiment.""" experiment.reload_experiment(self.api, 123, None, None) exp_files = {} self.api.reload_experiment.assert_called_with(123, exp_files) experiment.reload_experiment(self.api, 123, 120, 3124159) exp_files = {'duration': '120', 'reservation': '3124159'} self.api.reload_experiment.assert_called_with(123, exp_files)
def reload_experiment_parser(opts): """Parse namespace 'opts' object and execute requested 'reload' command.""" user, passwd = auth.get_user_credentials(opts.username, opts.password) api = rest.Api(user, passwd) return experiment.reload_experiment(api, opts.experiment_id, opts.duration, opts.reservation)