diff --git a/.travis.yml b/.travis.yml index 1d01efc..d00de04 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,8 @@ install: - pip install python-magic - pip install coveralls - pip install codecov + - pip install officedissector + - if [ $(python -c 'import sys; print(sys.version_info.major)') == '2' ]; then pip install oletools olefile ; fi - python setup.py -q install script: diff --git a/bin/filecheck.py b/bin/filecheck.py index 517cf1a..7b96739 100644 --- a/bin/filecheck.py +++ b/bin/filecheck.py @@ -86,7 +86,7 @@ class File(FileBase): pass -class KittenGroomer(KittenGroomerBase): +class KittenGroomerFileCheck(KittenGroomerBase): def __init__(self, root_src=None, root_dst=None, max_recursive=5): ''' @@ -96,7 +96,7 @@ class KittenGroomer(KittenGroomerBase): root_src = os.path.join(os.sep, 'media', 'src') if root_dst is None: root_dst = os.path.join(os.sep, 'media', 'dst') - super(KittenGroomer, self).__init__(root_src, root_dst) + super(KittenGroomerFileCheck, self).__init__(root_src, root_dst) self.recursive = 0 self.max_recursive = max_recursive @@ -409,4 +409,4 @@ class KittenGroomer(KittenGroomerBase): self._print_log() if __name__ == '__main__': - main(KittenGroomer, 'Generic version of the KittenGroomer. Convert and rename files.') + main(KittenGroomerFileCheck, 'Generic version of the KittenGroomer. Convert and rename files.') diff --git a/tests/test.py b/tests/test.py index dc152d7..bb1063b 100644 --- a/tests/test.py +++ b/tests/test.py @@ -3,10 +3,12 @@ import unittest import os +import sys from bin.specific import KittenGroomerSpec from bin.pier9 import KittenGroomerPier9 from bin.generic import KittenGroomer +from bin.filecheck import KittenGroomerFileCheck from kittengroomer import FileBase @@ -41,6 +43,14 @@ class TestBasic(unittest.TestCase): spec = KittenGroomer(src, dst) spec.processdir() + def test_filecheck(self): + if sys.version_info.major >= 3: + return + src = os.path.join(self.curpath, 'tests/src') + dst = os.path.join(self.curpath, 'tests/dst') + spec = KittenGroomerFileCheck(src, dst) + spec.processdir() + def test_help_file(self): f = FileBase('tests/src/blah.conf', 'tests/dst/blah.conf') f.make_unknown()