Example #1
0
    def test_existing_directory_not_added_to_datasearch_directories(self):
        current_dirs = "A/Path/;A/Path/Already/Added/"
        batch_file = "A/Path/Already/Added/batch_file.csv"
        _, result = add_dir_to_datasearch(batch_file, current_dirs)

        expected_result = "A/Path/;A/Path/Already/Added/"
        self.assertEqual(expected_result, result)
Example #2
0
    def test_empty_string_not_added_to_datasearch_directories(self):
        current_dirs = "A/Path/"
        batch_file = "batch_file.csv"
        _, result = add_dir_to_datasearch(batch_file, current_dirs)

        expected_result = "A/Path/"
        self.assertEqual(expected_result, result)
Example #3
0
    def test_datasearch_directories_updated(self):
        current_dirs = "A/Path/"
        batch_file = "A/Path/To/Batch/File/batch_file.csv"
        _, result = add_dir_to_datasearch(batch_file, current_dirs)

        expected_result = "A/Path/;A/Path/To/Batch/File/"
        self.assertEqual(expected_result, result)
Example #4
0
    def test_empty_string_not_added_to_datasearch_directories(self):
        current_dirs = "A/Path/"
        batch_file = "batch_file.csv"
        _, result = add_dir_to_datasearch(batch_file, current_dirs)

        expected_result = "A/Path/"
        self.assertEqual(expected_result, result)
Example #5
0
    def test_datasearch_directories_updated(self):
        current_dirs = "A/Path/"
        batch_file = "A/Path/To/Batch/File/batch_file.csv"
        _, result = add_dir_to_datasearch(batch_file, current_dirs)

        expected_result = "A/Path/;A/Path/To/Batch/File/"
        self.assertEqual(expected_result, result)
Example #6
0
    def test_existing_directory_not_added_to_datasearch_directories(self):
        current_dirs = "A/Path/;A/Path/Already/Added/"
        batch_file = "A/Path/Already/Added/batch_file.csv"
        _, result = add_dir_to_datasearch(batch_file, current_dirs)

        expected_result = "A/Path/;A/Path/Already/Added/"
        self.assertEqual(expected_result, result)