def test_passing_params(self, mock_validator, mock_file): mock_file.return_value = TASKS args = ['/usr/local/bin/tasks-validator', '-d', './path', '-v', '6.1'] validator.main(args) mock_file.called_with('./path') mock_validator.assert_called_with(TASKS, '6.1')
def test_no_dir(self): args = ['script/name'] try: validator.main(args) except SystemExit as pars_error: pass self.assertEqual(pars_error[0], 2)