def test_help(self):
     with self.assertRaises(SystemExit) as ex:
         json_to_mako_wrapper(['--help'])
     self.assertEqual(0, ex.exception.code)
 def test_example_no_input(self):
     with self.assertRaises(SystemExit) as ex:
         json_to_mako_wrapper(['--template', 'example/address-book.mako',
                               '--output', 'tests/address-book.html'])
     self.assertEqual(2, ex.exception.code)
 def test_example_no_output(self):
     with self.assertRaises(SystemExit) as ex:
         json_to_mako_wrapper(['--input', 'example/family.json',
                               '--input', 'example/work.json',
                               '--template', 'example/address-book.mako'])
     self.assertEqual(2, ex.exception.code)
 def test_example_dual_input(self):
     json_to_mako_wrapper(['--input', 'example/family.json',
                           '--template', 'example/address-book.mako',
                           '--output', 'tests/address-book.html'])