Ubuntu Pastebin

Paste from smoser at Fri, 17 Jul 2015 15:39:23 +0000

Download as text
1
2
3
4
5
6
    def test_invalid_exits_fail(self):
        with self.assertRaises(SystemExit) as cm:
            # silence writes that get to stderr
            with mock.patch('cloudinit.shell.sys.stderr') as stderr:
                shell.main(args=['cloud-init', 'bogus_argument'])
        self.assertNotEqual(cm.exception.code, 0)
Download as text