def test_validate_files_exist_with_existing_file(self): os.chdir(self.test_directory) config = ConfigService.initialize_config(TEST_CONFIG_FILE_PATH) FileService.navigate_to_working_directory(config) FileService.validate_csv_file_extensions(config) FileService.validate_files_exist(config) file_instance = glob.glob(config.FILES[0]) assert len(file_instance) > 0
def test_validate_files_exist_with_nonexistant_file(self): with pytest.raises(FileNotFoundError): os.chdir(self.test_directory) config = ConfigService.initialize_config(TEST_CONFIG_FILE_PATH) config.WORKING_DIRECTORY = "tests" FileService.navigate_to_working_directory(config) FileService.validate_csv_file_extensions(config) FileService.validate_files_exist(config)