# Path: adsft/utils.py
# class FileInputStream(object):
# class TextCleaner(object):
#     def __init__(self, input_stream):
#     def print_info(self):
#     def extract(self, force_extract=False, force_send=False):
#     def __init__(self, text):
#     def translate(self):
#     def decode(self):
#     def normalise(self):
#     def trimwords(self, maxlength=100):
#     def run(self, translate=True, decode=True, normalise=True, trim=True):
# def get_filenames(file_string):
# 
# Path: adsft/checker.py
# def file_last_modified_time(file_input):
# def create_meta_path(dict_input, extract_path):
# def meta_output_exists(file_input, extract_path):
# def load_meta_file(file_input, extract_path):
# def meta_needs_update(dict_input, meta_content,
#                       extract_path):
# def check_if_extract(message_list, extract_path):
#     NEEDS_UPDATE = ["MISSING_FULL_TEXT", "DIFFERING_FULL_TEXT", "STALE_CONTENT",
#                     "STALE_META", "NOT_EXTRACTED_BEFORE", "FORCE_TO_EXTRACT",
#                     "FORCE_TO_SEND"]
# 
# Path: adsft/tests/test_base.py
# def build_links(test_name):
#     def setUp(self):
#     def tearDown(self):
#     def setUp(self):
#     def tearDown(self):
#     def helper_get_details(self, test_publish):
#     def calculate_expected_folders(self, full_text_links):
#     def clean_up_path(self, paths):
# class TestUnit(unittest.TestCase):
# class TestGeneric(unittest.TestCase):
#         PROJ_HOME = self.app.conf['PROJ_HOME']


import sys
import unittest
import os
import re
    from builtins import str
from adsft import utils, checker
from adsft.tests import test_base
        )

        new_meta_content = {}

        for key in meta_content.keys():
            if key != 'ft_source':
                new_meta_content[key] = meta_content[key]

        updated = checker.meta_needs_update(
            FileInputStream,
            new_meta_content,
            self.app.conf['FULLTEXT_EXTRACT_PATH']
        )

        self.assertEqual(updated,
                         'MISSING_FULL_TEXT',
                         'The ft_source should need updating, not {0}'
                         .format(updated))


    def test_file_should_be_updated_if_content_differs_to_input(self):
        """
        Tests the meta_needs_update function. Loads some meta content from disk,
        and then modifies the full text path to be different. The meta_needs_
        update function should then determine that the full text content differs
        and supply the DIFFERING_FULL_TEXT flag.

        :return: no return
        """


# Path: adsft/utils.py
# class FileInputStream(object):
# class TextCleaner(object):
#     def __init__(self, input_stream):
#     def print_info(self):
#     def extract(self, force_extract=False, force_send=False):
#     def __init__(self, text):
#     def translate(self):
#     def decode(self):
#     def normalise(self):
#     def trimwords(self, maxlength=100):
#     def run(self, translate=True, decode=True, normalise=True, trim=True):
# def get_filenames(file_string):
# 
# Path: adsft/checker.py
# def file_last_modified_time(file_input):
# def create_meta_path(dict_input, extract_path):
# def meta_output_exists(file_input, extract_path):
# def load_meta_file(file_input, extract_path):
# def meta_needs_update(dict_input, meta_content,
#                       extract_path):
# def check_if_extract(message_list, extract_path):
#     NEEDS_UPDATE = ["MISSING_FULL_TEXT", "DIFFERING_FULL_TEXT", "STALE_CONTENT",
#                     "STALE_META", "NOT_EXTRACTED_BEFORE", "FORCE_TO_EXTRACT",
#                     "FORCE_TO_SEND"]
# 
# Path: adsft/tests/test_base.py
# def build_links(test_name):
#     def setUp(self):
#     def tearDown(self):
#     def setUp(self):
#     def tearDown(self):
#     def helper_get_details(self, test_publish):
#     def calculate_expected_folders(self, full_text_links):
#     def clean_up_path(self, paths):
# class TestUnit(unittest.TestCase):
# class TestGeneric(unittest.TestCase):
#         PROJ_HOME = self.app.conf['PROJ_HOME']


# Path: adsft/tests/test_checker.py
import sys
import unittest
import os
import re
    from builtins import str
from adsft import utils, checker
from adsft.tests import test_base

        )

        new_meta_content = {}

        for key in meta_content.keys():
            if key != 'ft_source':
                new_meta_content[key] = meta_content[key]

        updated = checker.meta_needs_update(
            FileInputStream,
            new_meta_content,
            self.app.conf['FULLTEXT_EXTRACT_PATH']
        )

        self.assertEqual(updated,
                         'MISSING_FULL_TEXT',
                         'The ft_source should need updating, not {0}'
                         .format(updated))


    def test_file_should_be_updated_if_content_differs_to_input(self):
        """
        Tests the meta_needs_update function. Loads some meta content from disk,
        and then modifies the full text path to be different. The meta_needs_
        update function should then determine that the full text content differs
        and supply the DIFFERING_FULL_TEXT flag.

        :return: no return
        """


        FileInputStream = utils.FileInputStream(self.test_file_exists)