Ejemplo n.º 1
0
    def test_bad_app_path(self):
        bogus_path = os.path.join(self.tank_temp, "bogus_path")

        self.assertRaises(TankError, application.get_application, self.engine,
                          bogus_path, "bogus_app", {}, "instance_name")

        try:
            application.get_application(self.engine, bogus_path, "bogus_app",
                                        {}, "instance_name")
        except TankError, cm:
            expected_msg = "Failed to load plugin"
            self.assertTrue(cm.message.startswith(expected_msg))
Ejemplo n.º 2
0
 def test_bad_app_path(self):
     bogus_path = os.path.join(self.tank_temp, "bogus_path")
     
     self.assertRaises(TankError,
                       application.get_application,
                       self.engine, bogus_path, "bogus_app", {}, "instance_name", None)
     
     try:
         application.get_application(self.engine, bogus_path, "bogus_app", {}, "instance_name", None)
     except TankError, cm:
         expected_msg = "Failed to load plugin"
         self.assertTrue(cm.message.startswith(expected_msg))
Ejemplo n.º 3
0
    def test_bad_app_path(self):
        """
        Tests a get_application invalid path
        """
        bogus_path = os.path.join(self.tank_temp, "bogus_path")

        self.assertRaises(TankError, application.get_application, self.engine,
                          bogus_path, "bogus_app", {}, "instance_name", None)

        try:
            application.get_application(self.engine, bogus_path, "bogus_app",
                                        {}, "instance_name", None)
        except TankError as cm:
            expected_msg = "Failed to load plugin"
            self.assertTrue(str(cm).startswith(expected_msg))
Ejemplo n.º 4
0
 def test_good_path(self):
     app_path = os.path.join(self.project_config, "bundles", "test_app")
     # make a dev location and create descriptor
     app_desc = descriptor.get_from_location(descriptor.AppDescriptor.APP, 
                                             self.tk.pipeline_configuration, 
                                             {"type": "dev", "path": app_path})
     result = application.get_application(self.engine, app_path, app_desc, {}, "instance_name", None)
     self.assertIsInstance(result, application.Application)
Ejemplo n.º 5
0
 def test_good_path(self):
     """
     Tests a get_application valid path
     """
     app_path = os.path.join(self.project_config, "bundles", "test_app")
     # make a dev location and create descriptor
     app_desc = self.tk.pipeline_configuration.get_app_descriptor({"type": "dev", "path": app_path})
     result = application.get_application(self.engine, app_path, app_desc, {}, "instance_name", None)
     self.assertIsInstance(result, application.Application)
Ejemplo n.º 6
0
 def test_good_path(self):
     app_path = os.path.join(self.project_config, "test_app")
     tk = tank.Tank(self.project_root)
     # make a dev location and create descriptor
     app_desc = descriptor.get_from_location(descriptor.AppDescriptor.APP,
                                             tk.pipeline_configuration, {
                                                 "type": "dev",
                                                 "path": app_path
                                             })
     result = application.get_application(self.engine, app_path, app_desc,
                                          {}, "instance_name")
     self.assertIsInstance(result, application.Application)