def setUp(self):
        self.controller = CloudsController()

        self.controllers_patcher = patch(
            'conjureup.controllers.clouds.gui.controllers')
        self.mock_controllers = self.controllers_patcher.start()
        self.utils_patcher = patch('conjureup.controllers.clouds.gui.utils')
        self.mock_utils = self.utils_patcher.start()

        self.render_patcher = patch(
            'conjureup.controllers.clouds.gui.CloudsController.render')
        self.mock_render = self.render_patcher.start()
        self.app_patcher = patch('conjureup.controllers.clouds.gui.app')
        self.mock_app = self.app_patcher.start()
        self.mock_app.ui = MagicMock(name="app.ui")

        self.cloud_types_patcher = patch(
            'conjureup.juju.get_cloud_types_by_name')
        self.mock_cloud_types = self.cloud_types_patcher.start()
        self.mock_cloud_types.return_value = {'aws': 'ec2'}

        self.cloudname = 'testcloudname'

        self.track_event_patcher = patch(
            'conjureup.controllers.clouds.gui.track_event')
        self.mock_track_event = self.track_event_patcher.start()

        self.mock_provider = MagicMock()
        self.load_schema_patcher = patch(
            'conjureup.controllers.clouds.gui.load_schema', self.mock_provider)
        self.mock_load_schema = self.load_schema_patcher.start()
Exemple #2
0
    def setUp(self):
        self.controller = CloudsController()

        self.finish_patcher = patch(
            'conjureup.controllers.clouds.gui.CloudsController.finish')
        self.mock_finish = self.finish_patcher.start()

        self.view_patcher = patch(
            'conjureup.controllers.clouds.gui.CloudView')
        self.view_patcher.start()
        self.app_patcher = patch(
            'conjureup.controllers.clouds.gui.app')
        mock_app = self.app_patcher.start()
        mock_app.ui = MagicMock(name="app.ui")
        self.list_clouds_patcher = patch(
            'conjureup.juju.get_compatible_clouds')
        self.mock_list_clouds = self.list_clouds_patcher.start()
        self.mock_list_clouds.return_value = ['test1', 'test2']
        self.get_clouds_patcher = patch(
            'conjureup.juju.get_clouds')
        self.mock_get_clouds_patcher = self.get_clouds_patcher.start()

        self.track_screen_patcher = patch(
            'conjureup.controllers.clouds.gui.track_screen')
        self.mock_track_screen = self.track_screen_patcher.start()
    def setUp(self):
        self.controller = CloudsController()

        self.controllers_patcher = patch(
            'conjureup.controllers.clouds.gui.controllers')
        self.mock_controllers = self.controllers_patcher.start()

        self.utils_patcher = patch(
            'conjureup.controllers.clouds.gui.utils')
        self.mock_utils = self.utils_patcher.start()

        self.render_patcher = patch(
            'conjureup.controllers.clouds.gui.CloudsController.render')
        self.mock_render = self.render_patcher.start()
        self.app_patcher = patch(
            'conjureup.controllers.clouds.gui.app')
        self.mock_app = self.app_patcher.start()
        self.mock_app.ui = MagicMock(name="app.ui")

        self.cloudname = 'testcloudname'
        self.juju_patcher = patch(
            'conjureup.controllers.clouds.gui.juju')
        self.mock_juju = self.juju_patcher.start()

        self.gcc_patcher = patch(
            'conjureup.controllers.clouds.gui.juju.get_controller_in_cloud')
        self.mock_gcc = self.gcc_patcher.start()
Exemple #4
0
    def setUp(self):
        self.controller = CloudsController()

        self.controllers_patcher = patch(
            'conjureup.controllers.clouds.gui.controllers')
        self.mock_controllers = self.controllers_patcher.start()

        self.render_patcher = patch(
            'conjureup.controllers.clouds.gui.CloudsController.render')
        self.mock_render = self.render_patcher.start()
        self.app_patcher = patch('conjureup.controllers.clouds.gui.app')
        self.mock_app = self.app_patcher.start()
        self.mock_app.ui = MagicMock(name="app.ui")

        self.cloudname = 'testcloudname'
Exemple #5
0
    def setUp(self):
        self.controller = CloudsController()

        self.utils_patcher = patch('conjureup.controllers.clouds.gui.utils')
        self.mock_utils = self.utils_patcher.start()

        self.finish_patcher = patch(
            'conjureup.controllers.clouds.gui.CloudsController.finish')
        self.mock_finish = self.finish_patcher.start()

        self.view_patcher = patch('conjureup.controllers.clouds.gui.CloudView')
        self.view_patcher.start()
        self.app_patcher = patch('conjureup.controllers.clouds.gui.app')
        mock_app = self.app_patcher.start()
        mock_app.ui = MagicMock(name="app.ui")
        self.list_clouds_patcher = patch(
            'conjureup.controllers.clouds.gui.list_clouds')
        self.mock_list_clouds = self.list_clouds_patcher.start()
        self.mock_list_clouds.return_value = ['test1', 'test2']