Exemplo n.º 1
0
 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')
Exemplo n.º 2
0
 def test_no_dir(self):
     args = ['script/name']
     try:
         validator.main(args)
     except SystemExit as pars_error:
         pass
     self.assertEqual(pars_error[0], 2)
Exemplo n.º 3
0
 def test_no_dir(self):
     args = ['script/name']
     try:
         validator.main(args)
     except SystemExit as pars_error:
         pass
     self.assertEqual(pars_error[0], 2)
Exemplo n.º 4
0
 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')