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