Esempio n. 1
0
	def verify_system_exit(self, exit_code):
		with self.assertRaises(SystemExit) as cm:
			monkey = Hyde()
			monkey.process_args()
		self.assertEqual(cm.exception.code, exit_code)
Esempio n. 2
0
	def test_process_args_with_args(self):
		input_args = ['add', 'page', "RealPage"]
		args = Hyde.process_args(input_args)
		self.assertEqual(args.sub_command, 'add')
		self.assertEqual(args.add_item_type, 'page')
		self.assertEqual(args.title, "RealPage")