def setUp(self): self.controller = CloudsController() self.controllers_patcher = patch( 'conjureup.controllers.clouds.tui.controllers') self.mock_controllers = self.controllers_patcher.start() self.utils_patcher = patch( 'conjureup.controllers.clouds.tui.utils') self.mock_utils = self.utils_patcher.start() self.render_patcher = patch( 'conjureup.controllers.clouds.tui.CloudsController.render') self.mock_render = self.render_patcher.start() self.app_patcher = patch( 'conjureup.controllers.clouds.tui.app') self.mock_app = self.app_patcher.start() self.mock_app.ui = MagicMock(name="app.ui") self.juju_patcher = patch( 'conjureup.controllers.clouds.tui.juju') self.mock_juju = self.juju_patcher.start() self.gcc_patcher = patch( 'conjureup.controllers.clouds.tui.juju.get_controller_in_cloud') self.mock_gcc = self.gcc_patcher.start()
def setUp(self): self.controller = CloudsController() self.utils_patcher = patch('conjureup.controllers.clouds.tui.utils') self.mock_utils = self.utils_patcher.start() self.finish_patcher = patch( 'conjureup.controllers.clouds.tui.CloudsController.finish') self.mock_finish = self.finish_patcher.start() self.app_patcher = patch('conjureup.controllers.clouds.tui.app') self.mock_app = self.app_patcher.start() self.mock_app.ui = MagicMock(name="app.ui") self.juju_patcher = patch('conjureup.controllers.clouds.tui.juju') self.mock_juju = self.juju_patcher.start()