def test_parsing_quits_if_no_guest_spec(self): with self.assertRaises(SystemExit) as ctx: scripts.parse_args_for_snap([]) self.assertTrue(0 != ctx.exception.code)
def test_guest_spec_parsed(self): options = scripts.parse_args_for_snap(['somearg']) self.assertEquals('somearg', options.guest_spec)