def setUp(self):
        """set up the test
        """
        conf.database_url = "sqlite://"

        # create the environment variable and point it to a temp directory
        self.temp_config_folder = tempfile.mkdtemp()
        self.temp_projects_folder = tempfile.mkdtemp()

        os.environ["OYPROJECTMANAGER_PATH"] = self.temp_config_folder
        os.environ[conf.repository_env_key] = self.temp_projects_folder

        self.inputs = [
            FileLink(filename="a.%03d.tga 5-14 100", path="/tmp"),
            FileLink(filename='b.%03d.tga 1-100', path="/tmp")
        ]

        self.outputs = [
            FileLink(
                filename=
                'Test_Proj_Test_Seq_SH001_MAIN_Lighting_beauty_MasterBeauty.%03d.exr 1-100',
                path='/tmp'),
            FileLink(
                filename=
                'Test_Proj_Test_Seq_SH001_MAIN_Lighting_shadow_MasterBeauty.%03d.exr 1-100',
                path='/tmp'),
        ]

        self.kwargs = {
            "inputs": self.inputs,
            "outputs": self.outputs,
        }

        self.test_io_mixed_in_obj = IOMixedInClass(**self.kwargs)
 def test_type_argument_is_None(self):
     """testing if the type argument is None will set the type to an empty
     string
     """
     self.kwargs['type'] = None
     new_file_link = FileLink(**self.kwargs)
     self.assertIs("", new_file_link.type)
 def test_type_argument_is_skipped(self):
     """testing if the type argument is skipped will set the type to an
     empty string
     """
     self.kwargs.pop('type')
     new_file_link = FileLink(**self.kwargs)
     self.assertIs("", new_file_link.type)
 def test_type_argument_is_working_properly(self):
     """testing if the type argument value is correctly passed to the type
     attribute
     """
     test_value = "Image Sequence"
     self.kwargs['type'] = test_value
     new_file_link = FileLink(**self.kwargs)
     self.assertEqual(test_value, new_file_link.type)
    def setUp(self):
        """set up the test
        """
        conf.database_url = "sqlite://"

        # create the environment variable and point it to a temp directory
        self.temp_config_folder = tempfile.mkdtemp()
        self.temp_projects_folder = tempfile.mkdtemp()

        os.environ["OYPROJECTMANAGER_PATH"] = self.temp_config_folder
        os.environ[conf.repository_env_key] = self.temp_projects_folder

        self.kwargs = {
            "filename": "test_file_name.txt",
            "path": "/some/path/to/an/unknown/place",
            "type": "Text"
        }

        self.test_file_link = FileLink(**self.kwargs)
 def test_outputs_attribute_is_working_properly(self):
     """testing if the outputs attribute is working properly
     """
     new_FileLinks = [FileLink('test.tga', '/tmp')]
     self.test_io_mixed_in_obj.outputs = new_FileLinks
     self.assertEqual(self.test_io_mixed_in_obj.outputs, new_FileLinks)