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