def setUp(self):
        """
        Prepare unit test.
        """
        TankTestBase.setUp(self)

        patcher = patch_app_store()
        self._mock_store = patcher.start()
        self.addCleanup(patcher.stop)
Example #2
0
    def setUp(self):
        """
        Prepare unit test.
        """
        TankTestBase.setUp(self)

        patcher = patch_app_store()
        self._mock_store = patcher.start()
        self.addCleanup(patcher.stop)
Example #3
0
    def setUp(self):
        """
        Sets up the next test's environment.
        """
        TankTestBase.setUp(self)

        # bare repo cloned from our official default config
        # multiple branches and tags
        self.git_repo_uri = os.path.join(self.fixtures_root, "misc", "tk-config-default.git")
        self.bundle_cache = os.path.join(self.project_root, "bundle_cache")
Example #4
0
    def setUp(self):
        """
        Sets up the next test's environment.
        """
        TankTestBase.setUp(self)

        # bare repo cloned from our official default config
        # multiple branches and tags
        self.git_repo_uri = os.path.join(self.fixtures_root, "misc",
                                         "tk-config-default.git")
        self.bundle_cache = os.path.join(self.project_root, "bundle_cache")
Example #5
0
    def setUp(self):
        """
        Sets up the next test's environment.
        """
        TankTestBase.setUp(self)

        # bare repo cloned from our official default config
        # multiple branches and tags
        self.git_repo_uri = os.path.join(self.fixtures_root, "misc", "tk-config-default.git")

        # Bare-minimum repo with both annotated and lightweight tags
        self.git_tag_repo_uri = os.path.join(self.fixtures_root, "misc", "tag-test-repo.git")

        self.bundle_cache = os.path.join(self.project_root, "bundle_cache")
Example #6
0
    def setUp(self):
        """
        Sets up the next test's environment.
        """
        TankTestBase.setUp(self)

        # bare repo cloned from our official default config
        # multiple branches and tags
        self.git_repo_uri = os.path.join(self.fixtures_root, "misc", "tk-config-default.git")

        # Bare-minimum repo with both annotated and lightweight tags
        self.git_tag_repo_uri = os.path.join(self.fixtures_root, "misc", "tag-test-repo.git")

        self.bundle_cache = os.path.join(self.project_root, "bundle_cache")
Example #7
0
    def setUp(self):
        """
        Prepare unit test.
        """
        TankTestBase.setUp(
            self,
            # Use a custom primary root name
            parameters={"primary_root_name": "setup_project_root"},
        )
        self.setup_fixtures("app_store_tests")

        patcher = patch_app_store()
        self._mock_store = patcher.start()
        self.addCleanup(patcher.stop)

        # Make sure we have a version in the app store for all bundles.
        self._mock_store.add_engine("tk-engine", "v1.0.0")
        self._mock_store.add_engine("tk-test", "v1.0.0")
        self._mock_store.add_application("tk-multi-app", "v1.0.0")
        self._mock_store.add_application("tk-multi-nodep", "v1.0.0")
        self._mock_store.add_framework("tk-framework-test", "v1.0.0")
        self._mock_store.add_framework("tk-framework-2nd-level-dep", "v1.0.0")

        # the std fixtures do not have a full core installation so ensure
        # that we mock one that localize can pick up
        self._fake_core_install = os.path.join(self.tank_temp,
                                               "fake_core_install")
        if not os.path.exists(self._fake_core_install):
            os.makedirs(os.path.join(self._fake_core_install, "install"))
            os.makedirs(
                os.path.join(self._fake_core_install, "install", "core"))
            os.makedirs(
                os.path.join(self._fake_core_install, "install", "core",
                             "fake_core"))
            os.makedirs(os.path.join(self._fake_core_install, "config"))
            cfg_core = os.path.join(self._fake_core_install, "config", "core")
            os.makedirs(cfg_core)
            self.create_file(
                os.path.join(cfg_core, "shotgun.yml"),
                "{host: http://unit_test_mock_sg}",
            )
            self.create_file(os.path.join(cfg_core, "interpreter_Darwin.cfg"),
                             "")
            self.create_file(os.path.join(cfg_core, "interpreter_Linux.cfg"),
                             "")
            self.create_file(os.path.join(cfg_core, "interpreter_Windows.cfg"),
                             "")
Example #8
0
    def setUp(self):
        """
        Prepares unit test with basic bundles.
        """
        TankTestBase.setUp(self)
        self.setup_fixtures("app_store_tests")

        patcher = patch_app_store()
        self._mock_store = patcher.start()
        self.addCleanup(patcher.stop)

        self._engine_bundle = self._mock_store.add_engine("tk-engine", "v1.0.0")
        self._app_bundle = self._mock_store.add_application("tk-multi-app", "v1.0.0")
        self._2nd_level_dep_bundle = self._mock_store.add_framework("tk-framework-2nd-level-dep", "v1.0.0")

        self._update_cmd = self.tk.get_command("updates")
        self._update_cmd.set_logger(logging.getLogger("/dev/null"))
Example #9
0
    def setUp(self):
        """
        Prepares unit test with basic bundles.
        """
        TankTestBase.setUp(self)
        self.setup_fixtures("app_store_tests")

        patcher = patch_app_store()
        self._mock_store = patcher.start()
        self.addCleanup(patcher.stop)

        self._engine_bundle = self._mock_store.add_engine("tk-engine", "v1.0.0")
        self._app_bundle = self._mock_store.add_application("tk-multi-app", "v1.0.0")
        self._2nd_level_dep_bundle = self._mock_store.add_framework("tk-framework-2nd-level-dep", "v1.0.0")

        self._update_cmd = self.tk.get_command("updates")
        self._update_cmd.set_logger(logging.getLogger("/dev/null"))
Example #10
0
    def setUp(self):
        """
        Prepare unit test.
        """
        TankTestBase.setUp(self)

        patcher = patch_app_store()
        self._mock_store = patcher.start()
        self.addCleanup(patcher.stop)

        # Test is running updates on the configuration files, so we'll copy the config into the
        # pipeline configuration.
        self.setup_fixtures("core_update_tests",
                            parameters={"installed_config": True})

        # This will be the core version we will update to.
        self._mock_store.add_core("v0.19.5")
Example #11
0
    def setUp(self):
        """
        Prepare unit test.
        """
        TankTestBase.setUp(self)

        patcher = patch_app_store()
        self._mock_store = patcher.start()
        self.addCleanup(patcher.stop)

        self.setup_fixtures("app_store_tests")

        self._mock_store.add_engine("tk-test", "v1.0.0")
        self._mock_store.add_application("tk-multi-nodep", "v1.0.0")
        self._mock_store.add_application("tk-multi-nodep", "v2.0.0")
        self._mock_store.add_framework("tk-framework-test", "v1.0.0")
        self._mock_store.add_framework("tk-framework-test", "v1.0.1")
        self._mock_store.add_framework("tk-framework-test", "v1.1.0")
Example #12
0
    def setUp(self):
        """
        Prepare unit test.
        """
        TankTestBase.setUp(self)

        patcher = patch_app_store()
        self._mock_store = patcher.start()
        self.addCleanup(patcher.stop)

        self.setup_fixtures("app_store_tests")

        self._mock_store.add_engine("tk-test", "v1.0.0")
        self._mock_store.add_application("tk-multi-nodep", "v1.0.0")
        self._mock_store.add_application("tk-multi-nodep", "v2.0.0")
        self._mock_store.add_framework("tk-framework-test", "v1.0.0")
        self._mock_store.add_framework("tk-framework-test", "v1.0.1")
        self._mock_store.add_framework("tk-framework-test", "v1.1.0")
Example #13
0
    def setUp(self):
        """
        Prepares unit test with basic bundles.
        """
        TankTestBase.setUp(self)
        # Test is running updates on the configuration files, so we'll copy the config into the
        # pipeline configuration.
        self.setup_fixtures("app_store_tests", parameters={"installed_config": True})

        patcher = patch_app_store()
        self._mock_store = patcher.start()
        self.addCleanup(patcher.stop)

        self._engine_bundle = self._mock_store.add_engine("tk-engine", "v1.0.0")
        self._app_bundle = self._mock_store.add_application("tk-multi-app", "v1.0.0")
        self._2nd_level_dep_bundle = self._mock_store.add_framework("tk-framework-2nd-level-dep", "v1.0.0")

        self._update_cmd = self.tk.get_command("updates")
        self._update_cmd.set_logger(logging.getLogger("/dev/null"))
Example #14
0
    def setUp(self):
        """
        Prepare unit test.
        """
        TankTestBase.setUp(self)

        patcher = patch_app_store()
        self._mock_store = patcher.start()
        self.addCleanup(patcher.stop)

        # Test is running updates on the configuration files, so we'll copy the config into the
        # pipeline configuration.
        self.setup_fixtures("app_store_tests", parameters={"installed_config": True})

        self._mock_store.add_engine("tk-test", "v1.0.0")
        self._mock_store.add_application("tk-multi-nodep", "v1.0.0")
        self._mock_store.add_application("tk-multi-nodep", "v2.0.0")
        self._mock_store.add_framework("tk-framework-test", "v1.0.0")
        self._mock_store.add_framework("tk-framework-test", "v1.0.1")
        self._mock_store.add_framework("tk-framework-test", "v1.1.0")
Example #15
0
    def setUp(self):
        """
        Prepare unit test.
        """
        TankTestBase.setUp(
            self,
            # Use a custom primary root name
            parameters={"primary_root_name": "setup_project_root"}
        )
        self.setup_fixtures("app_store_tests")

        patcher = patch_app_store()
        self._mock_store = patcher.start()
        self.addCleanup(patcher.stop)

        # Make sure we have a version in the app store for all bundles.
        self._mock_store.add_engine("tk-engine", "v1.0.0")
        self._mock_store.add_engine("tk-test", "v1.0.0")
        self._mock_store.add_application("tk-multi-app", "v1.0.0")
        self._mock_store.add_application("tk-multi-nodep", "v1.0.0")
        self._mock_store.add_framework("tk-framework-test", "v1.0.0")
        self._mock_store.add_framework("tk-framework-2nd-level-dep", "v1.0.0")

        # the std fixtures do not have a full core installation so ensure
        # that we mock one that localize can pick up
        self._fake_core_install = os.path.join(self.tank_temp, "fake_core_install")
        if not os.path.exists(self._fake_core_install):
            os.makedirs(os.path.join(self._fake_core_install, "install"))
            os.makedirs(os.path.join(self._fake_core_install, "install", "core"))
            os.makedirs(os.path.join(self._fake_core_install, "install", "core", "fake_core"))
            os.makedirs(os.path.join(self._fake_core_install, "config"))
            cfg_core = os.path.join(self._fake_core_install, "config", "core")
            os.makedirs(cfg_core)
            self.create_file(os.path.join(cfg_core, "shotgun.yml"), "{host: http://unit_test_mock_sg}")
            self.create_file(os.path.join(cfg_core, "interpreter_Darwin.cfg"), "")
            self.create_file(os.path.join(cfg_core, "interpreter_Linux.cfg"), "")
            self.create_file(os.path.join(cfg_core, "interpreter_Windows.cfg"), "")
Example #16
0
 def setUp(self):
     """
     Sets up the next test's environment.
     """
     TankTestBase.setUp(self)
     UserSettings.clear_singleton()
Example #17
0
 def setUp(self):
     """
     Sets up the next test's environment.
     """
     TankTestBase.setUp(self)
     UserSettings.clear_singleton()