예제 #1
0
 def test_bad_json(self):
     commandLine = CommandLine()
     json = {'not_a_program': 'never_mind'}
     self.assertFalse(commandLine.extract_command(json))
예제 #2
0
 def test_extract_command(self):
     commandLine = CommandLine()
     json = {'command': 'ps -ef'}
     self.assertEqual(commandLine.extract_command(json), ['ps', '-ef'])