def test_runsetup(self): with patch('ferenda.manager.sys.exit') as mockexit: with patch('ferenda.manager.setup', return_value=True): manager.runsetup() self.assertFalse(mockexit.called) mockexit.reset_mock() with patch('ferenda.manager.setup', return_value=False): manager.runsetup() self.assertTrue(mockexit.called)
#!/usr/bin/env python from ferenda import manager if __name__ == '__main__': manager.runsetup()
#!/usr/bin/env python from ferenda import manager manager.runsetup()