def _test_parse_args_fails(self, args: str) -> None: """ Test that parsing the given arg string raises an exception """ with self.assertRaises(OatmealParseError): OatmealMsg._parse_args(args.encode('ascii'))
def _test_parse_args(self, args: str, expected_res: list) -> None: """ Parse args and test that we get a given result """ parsed_args = OatmealMsg._parse_args(args.encode('ascii')) self.assertEqual(parsed_args, expected_res)