Example #1
0
def test_simple_step():
    """
	Tests simple_job()
	"""
    conn = Mock()
    emr_jar_info = namedtuple("TestInfo", "name bucket version")
    mock_jar_info = emr_jar_info(name="FooName", bucket="FooBucket", version="FooVersion")
    input_dir = "s3n://foo_bucket/"
    jarargs = []
    options = Mock()
    options.job_name = None
    options.job_log_dir = None
    options.slave_spot_instances = None
    options.bootstrap = None
    options.ami_version = "FooAMIVersion"
    options.classname = "FooClassName"
    options.custom_output = None
    options.ninstances = 100
    options.isize = "m1.xlarge"
    options.debug = None
    options.version = "1.0.3"
    options.job_flow_role = "EMRJobflowDefault"
    options.slave_spot_instances = None
    options.keep_alive = False
    options.visible_to_all_users = False
    dummy_key_pair = "dummy_key_pair"

    bootstrap_action_return_value = [Mock()]
    mock_bootstrap_action.return_value = bootstrap_action_return_value

    job_log_dir = emr_under_test.build_job_log_prefix(emr_jar_info=mock_jar_info, options=options)

    mock_proj_name = emr_under_test._get_project_name(mock_jar_info, options)

    step_return_value = Mock()
    mock_step.return_value = step_return_value

    # Call the actual method under test.
    emr_under_test.simple_job(conn, mock_jar_info, input_dir, jarargs, dummy_key_pair, options)
    mock_step.assert_called_with(
        mock_proj_name, mock_jar_info, input_dir, jarargs, options.classname, options.custom_output
    )

    conn.run_jobflow.assert_called_with(
        name=mock_jar_info.name,
        log_uri=job_log_dir,
        steps=step_return_value,
        num_instances=options.ninstances,
        master_instance_type=options.isize,
        slave_instance_type=options.isize,
        enable_debugging=None,
        hadoop_version=options.version,
        bootstrap_actions=bootstrap_action_return_value,
        instance_groups=None,
        ami_version=options.ami_version,
        ec2_keyname=dummy_key_pair,
        keep_alive=False,
        job_flow_role=options.job_flow_role,
        visible_to_all_users=False,
    )
Example #2
0
def create_fake_endpoint(name="source", **kw):
    ep = Mock()
    ep.zone.name = name
    ep.secret_key = kw.get("secret", "secret")
    ep.access_key = kw.get("access", "access")
    ep.port = kw.get("port", 7777)
    ep.host = kw.get("host", "localhost")
    ep.debug = kw.get("debug", True)
    return ep
Example #3
0
 def _create_manager(self):
     options = Mock()
     options.debug = False
     options.force_locale = None
     options.log_level_file = None
     options.proxy_server = None
     options.update_site_url = None
     options.beta_update_site_url = None
     options.nxdrive_home = self.test_folder
     manager = Manager(options)
     return manager
Example #4
0
    def get_obj(self, logger=None):
        if not logger:

            def print_msg(msg):
                print(msg)

            logger = Mock()
            logger.error = Mock(side_effect=print_msg)
            logger.warning = Mock(side_effect=print_msg)
            logger.info = Mock(side_effect=print_msg)
            logger.debug = Mock(side_effect=print_msg)
        return self.test_obj(logger)
Example #5
0
    def setUp(self):
        self.folder = tempfile.mkdtemp(u"-nxdrive-tests")
        from mock import Mock

        options = Mock()
        options.debug = False
        options.force_locale = None
        options.proxy_server = None
        options.log_level_file = None
        options.update_site_url = None
        options.beta_update_site_url = None
        options.nxdrive_home = self.folder
        self.manager = Manager(options)
    def test_should_use_usage_information(self, mock_option_parser_class):

        mock_option_parser = Mock()
        mock_values = Mock()
        mock_values.version = False
        mock_values.debug = False
        mock_arguments = ["foo", "bar"]
        mock_option_parser.parse_args.return_value = (mock_values, mock_arguments)
        mock_option_parser_class.return_value = mock_option_parser

        parse_arguments([], version="")

        mock_option_parser_class.assert_called_with(usage=USAGE_INFORMATION)
    def setUp(self):
        config = types.ModuleType("config")

        handler_mock = Mock()
        config.HANDLER_CLASS = lambda: handler_mock

        logger_mock = Mock()
        logger_mock.info = Mock()
        logger_mock.error = Mock()
        logger_mock.debug = Mock()
        config.GET_LOGGER_FUNCTION = lambda: logger_mock

        def test_bindings(binder):
            binder.bind("cli_service", Mock())

        self.driver = CiscoNXOSDriver(config, test_bindings)
    def test_bind_local_folder_on_config_folder(self):
        options = Mock()
        options.debug = False
        options.delay = TEST_DEFAULT_DELAY
        options.force_locale = None
        options.proxy_server = None
        options.log_level_file = None
        options.update_site_url = None
        options.beta_update_site_url = None
        options.nxdrive_home = self.nxdrive_conf_folder
        self.manager = Manager(options)

        with self.assertRaises(FolderAlreadyUsed):
            self.manager.bind_server(
                self.nxdrive_conf_folder, self.nuxeo_url, self.user, self.password, start_engine=False
            )
    def test_should_print_help_screen_and_exit_when_less_than_two_positional_arguments_are_given(
        self, mock_option_parser_class, mock_exit
    ):

        mock_option_parser = Mock()
        mock_values = Mock()
        mock_values.version = False
        mock_values.debug = False
        mock_arguments = [""]
        mock_option_parser.parse_args.return_value = (mock_values, mock_arguments)
        mock_option_parser_class.return_value = mock_option_parser

        parse_arguments([], version="")

        mock_option_parser.print_help.assert_called_with()
        mock_exit.assert_called_with(1)
Example #10
0
    def get_obj(self, logger=None, setup=None, config=None):
        if config is None:
            config = lxml.etree.Element("Configuration")
        if not logger:

            def print_msg(msg):
                print(msg)

            logger = Mock()
            logger.error = Mock(side_effect=print_msg)
            logger.warning = Mock(side_effect=print_msg)
            logger.info = Mock(side_effect=print_msg)
            logger.debug = Mock(side_effect=print_msg)
        if not setup:
            setup = MagicMock()
        return self.test_obj(logger, setup, config)
Example #11
0
def get_posix_object(logger=None, setup=None, config=None):
    if config is None:
        config = lxml.etree.Element("Configuration")
    if not logger:

        def print_msg(msg):
            print(msg)

        logger = Mock()
        logger.error = Mock(side_effect=print_msg)
        logger.warning = Mock(side_effect=print_msg)
        logger.info = Mock(side_effect=print_msg)
        logger.debug = Mock(side_effect=print_msg)
    if not setup:
        setup = MagicMock()
    return Bcfg2.Client.Tools.POSIX.POSIX(logger, setup, config)
Example #12
0
 def test_get_logger_no_config(self, open, getQueueLogger, isdir):
     open.return_value = None
     isdir.return_value = True
     queueLogger = log.QueueLogger("virtwho")
     queueLogger.logger.handlers = []
     mockQueueLogger = Mock(wraps=queueLogger)
     getQueueLogger.return_value = mockQueueLogger
     options = Mock()
     options.debug = False
     options.background = True
     options.log_file = log.DEFAULT_LOG_FILE
     options.log_dir = log.DEFAULT_LOG_DIR
     options.log_per_config = False
     log.init(options)
     main_logger = log.getLogger(name="main")
     self.assertTrue(main_logger.name == "virtwho.main")
     self.assertTrue(len(main_logger.handlers) == 1)
     self.assertTrue(isinstance(main_logger.handlers[0], log.QueueHandler))
     queue_handlers = queueLogger.logger.handlers
     self.assertTrue(len(queue_handlers) == 1)
     self.assertEquals(queue_handlers[0].baseFilename, "%s/%s" % (log.DEFAULT_LOG_DIR, log.DEFAULT_LOG_FILE))
Example #13
0
    def get_obj(self, logger=None, setup=None, config=None):
        if config is None:
            config = lxml.etree.Element("Configuration")
        if not logger:

            def print_msg(msg):
                print(msg)

            logger = Mock()
            logger.error = Mock(side_effect=print_msg)
            logger.warning = Mock(side_effect=print_msg)
            logger.info = Mock(side_effect=print_msg)
            logger.debug = Mock(side_effect=print_msg)
        if not setup:
            setup = MagicMock()
        if "command_timeout" not in setup:
            setup["command_timeout"] = None
        execs = self.test_obj.__execs__
        self.test_obj.__execs__ = []
        rv = self.test_obj(logger, setup, config)
        self.test_obj.__execs__ = execs
        return rv
Example #14
0
    def test_get_logger_different_log_file(self, getFileHandler, getDefaultQueueLogger):
        queueLogger = log.QueueLogger("virtwho")
        queueLogger.logger.handlers = []
        mockQueueLogger = Mock(wraps=queueLogger)
        getDefaultQueueLogger.return_value = mockQueueLogger

        config = Mock()
        config.name = "test"
        config.log_file = "test.log"
        config.log_dir = "/test/"

        options = Mock()
        options.debug = False
        options.background = True
        options.log_per_config = True
        options.log_dir = ""
        options.log_file = ""
        test_logger = log.getLogger(options, config)

        self.assertTrue(test_logger.name == "virtwho.test")
        self.assertTrue(len(test_logger.handlers) == 1)
        self.assertTrue(len(queueLogger.logger.handlers) == 1)
        getFileHandler.assert_called_with(test_logger.name, config.log_file, config.log_dir)
    def setUpApp(self, server_profile=None):
        # Check the Nuxeo server test environment
        self.nuxeo_url = os.environ.get("NXDRIVE_TEST_NUXEO_URL")
        self.admin_user = os.environ.get("NXDRIVE_TEST_USER")
        self.password = os.environ.get("NXDRIVE_TEST_PASSWORD")
        self.build_workspace = os.environ.get("WORKSPACE")
        self.result = None
        self.tearedDown = False

        # Take default parameter if none has been set
        if self.nuxeo_url is None:
            self.nuxeo_url = "http://localhost:8080/nuxeo"
        if self.admin_user is None:
            self.admin_user = "Administrator"
        if self.password is None:
            self.password = "Administrator"
        self.tmpdir = None
        if self.build_workspace is not None:
            self.tmpdir = os.path.join(self.build_workspace, "tmp")
            if not os.path.isdir(self.tmpdir):
                os.makedirs(self.tmpdir)
        self.upload_tmp_dir = tempfile.mkdtemp(u"-nxdrive-uploads", dir=self.tmpdir)

        if None in (self.nuxeo_url, self.admin_user, self.password):
            raise unittest.SkipTest("No integration server configuration found in environment.")

        # Check the local filesystem test environment
        self.local_test_folder_1 = tempfile.mkdtemp(u"drive-1", dir=self.tmpdir)
        self.local_test_folder_2 = tempfile.mkdtemp(u"drive-2", dir=self.tmpdir)

        self.local_nxdrive_folder_1 = os.path.join(self.local_test_folder_1, u"Nuxeo Drive")
        os.mkdir(self.local_nxdrive_folder_1)
        self.local_nxdrive_folder_2 = os.path.join(self.local_test_folder_2, u"Nuxeo Drive")
        os.mkdir(self.local_nxdrive_folder_2)

        self.nxdrive_conf_folder_1 = os.path.join(self.local_test_folder_1, u"nuxeo-drive-conf")
        os.mkdir(self.nxdrive_conf_folder_1)
        self.nxdrive_conf_folder_2 = os.path.join(self.local_test_folder_2, u"nuxeo-drive-conf")
        os.mkdir(self.nxdrive_conf_folder_2)

        from mock import Mock

        options = Mock()
        options.debug = False
        options.delay = TEST_DEFAULT_DELAY
        options.force_locale = None
        options.proxy_server = None
        options.log_level_file = None
        options.update_site_url = None
        options.beta_update_site_url = None
        options.autolock_interval = 30
        options.nxdrive_home = self.nxdrive_conf_folder_1
        options.version == __version__
        options.upload_rate = 300
        options.download_rate = 300
        self.manager_1 = Manager(options)
        self.connected = False
        self.version = self.manager_1.get_version()
        import nxdrive

        nxdrive_path = os.path.dirname(nxdrive.__file__)
        i18n_path = os.path.join(nxdrive_path, "tests", "resources", "i18n.js")
        Translator(self.manager_1, i18n_path)
        options.nxdrive_home = self.nxdrive_conf_folder_2
        Manager._singleton = None
        self.manager_2 = Manager(options)
        url = self.nuxeo_url
        log.debug("Will use %s as url", url)
        if "#" in url:
            # Remove the engine type for the rest of the test
            self.nuxeo_url = url.split("#")[0]
        self.setUpServer(server_profile)

        nxdrive.engine.username_resolver.ENABLE_RESOLUTION = False
        self.engine_1 = self.manager_1.bind_server(
            self.local_nxdrive_folder_1, url, self.user_1, self.password_1, start_engine=False
        )
        self.engine_2 = self.manager_2.bind_server(
            self.local_nxdrive_folder_2, url, self.user_2, self.password_2, start_engine=False
        )
        self.engine_1.syncCompleted.connect(self.app.sync_completed)
        self.engine_1.get_remote_watcher().remoteScanFinished.connect(self.app.remote_scan_completed)
        self.engine_1.get_remote_watcher().changesFound.connect(self.app.remote_changes_found)
        self.engine_1.get_remote_watcher().noChangesFound.connect(self.app.no_remote_changes_found)
        self.engine_2.syncCompleted.connect(self.app.sync_completed)
        self.engine_2.get_remote_watcher().remoteScanFinished.connect(self.app.remote_scan_completed)
        self.engine_2.get_remote_watcher().changesFound.connect(self.app.remote_changes_found)
        self.engine_2.get_remote_watcher().noChangesFound.connect(self.app.no_remote_changes_found)
        self.queue_manager_1 = self.engine_1.get_queue_manager()
        self.queue_manager_2 = self.engine_2.get_queue_manager()

        self.sync_root_folder_1 = os.path.join(self.local_nxdrive_folder_1, self.workspace_title_1)
        self.sync_root_folder_2 = os.path.join(self.local_nxdrive_folder_2, self.workspace_title_2)

        self.local_root_client_1 = self.engine_1.get_local_client()
        self.local_root_client_2 = self.engine_2.get_local_client()

        self.local_client_1 = self.get_local_client(os.path.join(self.local_nxdrive_folder_1, self.workspace_title))
        self.local_client_2 = self.get_local_client(os.path.join(self.local_nxdrive_folder_2, self.workspace_title))

        # Document client to be used to create remote test documents
        # and folders
        remote_document_client_1 = RemoteDocumentClient(
            self.nuxeo_url,
            self.user_1,
            u"nxdrive-test-device-1",
            self.version,
            password=self.password_1,
            base_folder=self.workspace_1,
            upload_tmp_dir=self.upload_tmp_dir,
        )

        remote_document_client_2 = RemoteDocumentClient(
            self.nuxeo_url,
            self.user_2,
            u"nxdrive-test-device-2",
            self.version,
            password=self.password_2,
            base_folder=self.workspace_2,
            upload_tmp_dir=self.upload_tmp_dir,
        )
        # File system client to be used to create remote test documents
        # and folders
        remote_file_system_client_1 = RemoteFileSystemClient(
            self.nuxeo_url,
            self.user_1,
            u"nxdrive-test-device-1",
            self.version,
            password=self.password_1,
            upload_tmp_dir=self.upload_tmp_dir,
        )

        remote_file_system_client_2 = RemoteFileSystemClient(
            self.nuxeo_url,
            self.user_2,
            u"nxdrive-test-device-2",
            self.version,
            password=self.password_2,
            upload_tmp_dir=self.upload_tmp_dir,
        )

        self.remote_restapi_client_1 = RestAPIClient(
            self.nuxeo_url, self.user_1, u"nxdrive-test-device-1", self.version, password=self.password_1
        )
        self.remote_restapi_client_2 = RestAPIClient(
            self.nuxeo_url, self.user_2, u"nxdrive-test-device-2", self.version, password=self.password_2
        )
        self.remote_restapi_client_admin = RestAPIClient(
            self.nuxeo_url, self.admin_user, u"nxdrive-test-device-2", self.version, password=self.password
        )

        # Register root
        remote_document_client_1.register_as_root(self.workspace_1)
        remote_document_client_2.register_as_root(self.workspace_2)

        self.remote_document_client_1 = remote_document_client_1
        self.remote_document_client_2 = remote_document_client_2
        self.remote_file_system_client_1 = remote_file_system_client_1
        self.remote_file_system_client_2 = remote_file_system_client_2

        self._wait_sync = {self.engine_1.get_uid(): True, self.engine_2.get_uid(): True}
        self._wait_remote_scan = {self.engine_1.get_uid(): True, self.engine_2.get_uid(): True}
        self._remote_changes_count = {self.engine_1.get_uid(): 0, self.engine_2.get_uid(): 0}
        self._no_remote_changes = {self.engine_1.get_uid(): False, self.engine_2.get_uid(): False}
    def setUpApp(self, server_profile=None):
        # Check the Nuxeo server test environment
        self.nuxeo_url = os.environ.get("NXDRIVE_TEST_NUXEO_URL")
        self.admin_user = os.environ.get("NXDRIVE_TEST_USER")
        self.password = os.environ.get("NXDRIVE_TEST_PASSWORD")
        self.build_workspace = os.environ.get("WORKSPACE")
        self.result = None
        self.tearedDown = False

        # Take default parameter if none has been set
        if self.nuxeo_url is None:
            self.nuxeo_url = "http://localhost:8080/nuxeo"
        if self.admin_user is None:
            self.admin_user = "Administrator"
        if self.password is None:
            self.password = "Administrator"
        self.tmpdir = None
        if self.build_workspace is not None:
            self.tmpdir = os.path.join(self.build_workspace, "tmp")
            if not os.path.isdir(self.tmpdir):
                os.makedirs(self.tmpdir)

        if None in (self.nuxeo_url, self.admin_user, self.password):
            raise unittest.SkipTest("No integration server configuration found in environment.")

        # Check the local filesystem test environment
        self.local_test_folder_1 = tempfile.mkdtemp(u"-nxdrive-tests-user-1", dir=self.tmpdir)
        self.local_test_folder_2 = tempfile.mkdtemp(u"-nxdrive-tests-user-2", dir=self.tmpdir)

        self.local_nxdrive_folder_1 = os.path.join(self.local_test_folder_1, u"Nuxeo Drive")
        os.mkdir(self.local_nxdrive_folder_1)
        self.local_nxdrive_folder_2 = os.path.join(self.local_test_folder_2, u"Nuxeo Drive")
        os.mkdir(self.local_nxdrive_folder_2)

        self.nxdrive_conf_folder_1 = os.path.join(self.local_test_folder_1, u"nuxeo-drive-conf")
        os.mkdir(self.nxdrive_conf_folder_1)
        self.nxdrive_conf_folder_2 = os.path.join(self.local_test_folder_2, u"nuxeo-drive-conf")
        os.mkdir(self.nxdrive_conf_folder_2)

        from mock import Mock

        options = Mock()
        options.debug = False
        options.delay = TEST_DEFAULT_DELAY
        options.force_locale = None
        options.proxy_server = None
        options.log_level_file = None
        options.update_site_url = None
        options.beta_update_site_url = None
        options.autolock_interval = 30
        options.nxdrive_home = self.nxdrive_conf_folder_1
        self.manager_1 = Manager(options)
        import nxdrive

        nxdrive_path = os.path.dirname(nxdrive.__file__)
        i18n_path = os.path.join(nxdrive_path, "tests", "resources", "i18n.js")
        Translator(self.manager_1, i18n_path)
        options.nxdrive_home = self.nxdrive_conf_folder_2
        Manager._singleton = None
        self.manager_2 = Manager(options)
        self.version = __version__
        # Long timeout for the root client that is responsible for the test
        # environment set: this client is doing the first query on the Nuxeo
        # server and might need to wait for a long time without failing for
        # Nuxeo to finish initialize the repo on the first request after
        # startup
        root_remote_client = RemoteDocumentClient(
            self.nuxeo_url,
            self.admin_user,
            u"nxdrive-test-administrator-device",
            self.version,
            password=self.password,
            base_folder=u"/",
            timeout=60,
        )

        # Activate given profile if needed, eg. permission hierarchy
        if server_profile is not None:
            root_remote_client.activate_profile(server_profile)

        # Call the Nuxeo operation to setup the integration test environment
        credentials = root_remote_client.execute(
            "NuxeoDrive.SetupIntegrationTests", userNames="user_1, user_2", permission="ReadWrite"
        )

        credentials = [c.strip().split(u":") for c in credentials.split(u",")]
        self.user_1, self.password_1 = credentials[0]
        self.user_2, self.password_2 = credentials[1]
        self.engine_1 = self.manager_1.bind_server(
            self.local_nxdrive_folder_1, self.nuxeo_url, self.user_1, self.password_1, start_engine=False
        )
        self.engine_2 = self.manager_2.bind_server(
            self.local_nxdrive_folder_2, self.nuxeo_url, self.user_2, self.password_2, start_engine=False
        )
        self.engine_1.syncCompleted.connect(self.app.sync_completed)
        self.engine_1.get_remote_watcher().remoteScanFinished.connect(self.app.remote_scan_completed)
        self.engine_1.get_remote_watcher().changesFound.connect(self.app.remote_changes_found)
        self.engine_1.get_remote_watcher().noChangesFound.connect(self.app.no_remote_changes_found)
        self.engine_2.syncCompleted.connect(self.app.sync_completed)
        self.engine_2.get_remote_watcher().remoteScanFinished.connect(self.app.remote_scan_completed)
        self.engine_2.get_remote_watcher().changesFound.connect(self.app.remote_changes_found)
        self.engine_2.get_remote_watcher().noChangesFound.connect(self.app.no_remote_changes_found)
        self.queue_manager_1 = self.engine_1.get_queue_manager()
        self.queue_manager_2 = self.engine_2.get_queue_manager()

        ws_info = root_remote_client.fetch(TEST_WORKSPACE_PATH)
        self.workspace = ws_info[u"uid"]
        self.workspace_title = ws_info[u"title"]

        self.sync_root_folder_1 = os.path.join(self.local_nxdrive_folder_1, self.workspace_title)
        self.sync_root_folder_2 = os.path.join(self.local_nxdrive_folder_2, self.workspace_title)

        self.local_root_client_1 = self.engine_1.get_local_client()
        self.local_root_client_2 = self.engine_2.get_local_client()
        self.local_client_1 = LocalClient(os.path.join(self.local_nxdrive_folder_1, self.workspace_title))
        self.local_client_2 = LocalClient(os.path.join(self.local_nxdrive_folder_2, self.workspace_title))

        # Document client to be used to create remote test documents
        # and folders
        self.upload_tmp_dir = tempfile.mkdtemp(u"-nxdrive-uploads", dir=self.tmpdir)
        remote_document_client_1 = RemoteDocumentClient(
            self.nuxeo_url,
            self.user_1,
            u"nxdrive-test-device-1",
            self.version,
            password=self.password_1,
            base_folder=self.workspace,
            upload_tmp_dir=self.upload_tmp_dir,
        )

        remote_document_client_2 = RemoteDocumentClient(
            self.nuxeo_url,
            self.user_2,
            u"nxdrive-test-device-2",
            self.version,
            password=self.password_2,
            base_folder=self.workspace,
            upload_tmp_dir=self.upload_tmp_dir,
        )

        # File system client to be used to create remote test documents
        # and folders
        remote_file_system_client_1 = RemoteFileSystemClient(
            self.nuxeo_url,
            self.user_1,
            u"nxdrive-test-device-1",
            self.version,
            password=self.password_1,
            upload_tmp_dir=self.upload_tmp_dir,
        )

        remote_file_system_client_2 = RemoteFileSystemClient(
            self.nuxeo_url,
            self.user_2,
            u"nxdrive-test-device-2",
            self.version,
            password=self.password_2,
            upload_tmp_dir=self.upload_tmp_dir,
        )

        self.remote_restapi_client_1 = RestAPIClient(
            self.nuxeo_url, self.user_1, u"nxdrive-test-device-1", self.version, password=self.password_1
        )
        self.remote_restapi_client_2 = RestAPIClient(
            self.nuxeo_url, self.user_2, u"nxdrive-test-device-2", self.version, password=self.password_2
        )

        # Register root
        remote_document_client_1.register_as_root(self.workspace)
        remote_document_client_2.register_as_root(self.workspace)

        self.root_remote_client = root_remote_client
        self.remote_document_client_1 = remote_document_client_1
        self.remote_document_client_2 = remote_document_client_2
        self.remote_file_system_client_1 = remote_file_system_client_1
        self.remote_file_system_client_2 = remote_file_system_client_2

        self._wait_sync = {self.engine_1.get_uid(): True, self.engine_2.get_uid(): True}
        self._wait_remote_scan = {self.engine_1.get_uid(): True, self.engine_2.get_uid(): True}
        self._remote_changes_count = {self.engine_1.get_uid(): 0, self.engine_2.get_uid(): 0}
        self._no_remote_changes = {self.engine_1.get_uid(): False, self.engine_2.get_uid(): False}
Example #17
0
 def setUp(self):
     """Sets up a BraceReader object for use in the tests."""
     config = Mock()
     config.debug = False
     self.br = BraceReader(config)