Exemple #1
0
	def test_cmd_create_calls_create_method_with_right_args(self):
		""" tests that a create command calls right method with right args"""
		mock = Mock()
		parser = ArgParser(['./skelpy-test-call', 'create', 'path1', 'path2'])
		parser.skel = mock
		parser.parse()
		parser.exec_cmd()
		mock.create.assert_called_once_with('path1', 'path2')
Exemple #2
0
	def test_cmd_init_calls_init_method_with_path_as_arg(self):
		""" tests that a init command with a path calls the right method """
		mock = Mock()
		parser = ArgParser(['./skelpy-test-call', 'init', '.'])
		parser.skel = mock
		parser.parse()
		parser.exec_cmd()
		mock.init.assert_called_once_with('.')