def test_run(self): argv = ['--use-rhceph', '--verbose'] self.assertEqual(0, main.run(argv)) with mock.patch('platform.linux_distribution', lambda: (('unknown', '', ''))): self.assertRaises(exc.UnsupportedPlatform, main.run, argv) self.assertEqual(0, main.run(argv + ['--default=sysvinit']))
def test_run(self): argv = ['--use-rhceph', '--verbose'] self.assertEqual(0, main.run(argv)) with mock.patch('platform.linux_distribution', lambda: (('unknown', '', ''))): self.assertRaises(exc.UnsupportedPlatform, main.run, argv) self.assertEqual(0, main.run(argv + ['--default=sysvinit']))
def test_run_unknown_distro(self): argv = ['--use-rhceph', '--verbose'] with mock.patch.multiple('platform', system=lambda: 'Linux', linux_distribution=lambda **kwargs: (('unknown', '', ''))): self.assertRaises(exc.UnsupportedPlatform, main.run, argv) self.assertEqual(0, main.run(argv + ['--default=sysvinit']))
def test_run(self): argv = ['--use-rhceph', '--verbose'] self.assertEqual(0, main.run(argv))