diff options
Diffstat (limited to 'test/libtest.py')
| -rw-r--r-- | test/libtest.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/libtest.py b/test/libtest.py index 2f0ee8f..7b31e3e 100644 --- a/test/libtest.py +++ b/test/libtest.py | |||
| @@ -19,15 +19,15 @@ class TestRemovelib(test.MATTest): | |||
| 19 | def test_remove(self): | 19 | def test_remove(self): |
| 20 | '''make sure that the lib remove all compromizing meta''' | 20 | '''make sure that the lib remove all compromizing meta''' |
| 21 | for _, dirty in self.file_list: | 21 | for _, dirty in self.file_list: |
| 22 | current_file = mat.create_class_file(dirty, False, True) | 22 | current_file = mat.create_class_file(dirty, False, add2archive=True, low_pdf_quality=True) |
| 23 | current_file.remove_all() | 23 | current_file.remove_all() |
| 24 | current_file2 = mat.create_class_file(dirty, False, True) | 24 | current_file2 = mat.create_class_file(dirty, False, add2archive=True, low_pdf_quality=True) |
| 25 | self.assertTrue(current_file2.is_clean()) | 25 | self.assertTrue(current_file2.is_clean()) |
| 26 | 26 | ||
| 27 | def test_remove_empty(self): | 27 | def test_remove_empty(self): |
| 28 | '''Test removal with clean files''' | 28 | '''Test removal with clean files''' |
| 29 | for clean, _ in self.file_list: | 29 | for clean, _ in self.file_list: |
| 30 | current_file = mat.create_class_file(clean, False, True) | 30 | current_file = mat.create_class_file(clean, False, add2archive=True, low_pdf_quality=True) |
| 31 | current_file.remove_all() | 31 | current_file.remove_all() |
| 32 | self.assertTrue(current_file.is_clean()) | 32 | self.assertTrue(current_file.is_clean()) |
| 33 | 33 | ||
| @@ -39,14 +39,14 @@ class TestListlib(test.MATTest): | |||
| 39 | def test_list(self): | 39 | def test_list(self): |
| 40 | '''check if get_meta returns all the expected meta''' | 40 | '''check if get_meta returns all the expected meta''' |
| 41 | for _, dirty in self.file_list: | 41 | for _, dirty in self.file_list: |
| 42 | current_file = mat.create_class_file(dirty, False, True) | 42 | current_file = mat.create_class_file(dirty, False, add2archive=True, low_pdf_quality=True) |
| 43 | #FIXME assertisNotNone() : python 2.7 | 43 | #FIXME assertisNotNone() : python 2.7 |
| 44 | self.assertTrue(current_file.get_meta()) | 44 | self.assertTrue(current_file.get_meta()) |
| 45 | 45 | ||
| 46 | def testlist_list_empty(self): | 46 | def testlist_list_empty(self): |
| 47 | '''check that a listing of a clean file return an empty dict''' | 47 | '''check that a listing of a clean file return an empty dict''' |
| 48 | for clean, _ in self.file_list: | 48 | for clean, _ in self.file_list: |
| 49 | current_file = mat.create_class_file(clean, False, True) | 49 | current_file = mat.create_class_file(clean, False, add2archive=True, low_pdf_quality=True) |
| 50 | self.assertEqual(current_file.get_meta(), dict()) | 50 | self.assertEqual(current_file.get_meta(), dict()) |
| 51 | 51 | ||
| 52 | 52 | ||
| @@ -57,13 +57,13 @@ class TestisCleanlib(test.MATTest): | |||
| 57 | def test_dirty(self): | 57 | def test_dirty(self): |
| 58 | '''test is_clean on clean files''' | 58 | '''test is_clean on clean files''' |
| 59 | for _, dirty in self.file_list: | 59 | for _, dirty in self.file_list: |
| 60 | current_file = mat.create_class_file(dirty, False, True) | 60 | current_file = mat.create_class_file(dirty, False, add2archive=True, low_pdf_quality=True) |
| 61 | self.assertFalse(current_file.is_clean()) | 61 | self.assertFalse(current_file.is_clean()) |
| 62 | 62 | ||
| 63 | def test_clean(self): | 63 | def test_clean(self): |
| 64 | '''test is_clean on dirty files''' | 64 | '''test is_clean on dirty files''' |
| 65 | for clean, _ in self.file_list: | 65 | for clean, _ in self.file_list: |
| 66 | current_file = mat.create_class_file(clean, False, True) | 66 | current_file = mat.create_class_file(clean, False, add2archive=True, low_pdf_quality=True) |
| 67 | self.assertTrue(current_file.is_clean()) | 67 | self.assertTrue(current_file.is_clean()) |
| 68 | 68 | ||
| 69 | 69 | ||
| @@ -72,10 +72,10 @@ class TestFileAttributes(unittest.TestCase): | |||
| 72 | test various stuffs about files (readable, writable, exist, ...) | 72 | test various stuffs about files (readable, writable, exist, ...) |
| 73 | ''' | 73 | ''' |
| 74 | def test_not_writtable(self): | 74 | def test_not_writtable(self): |
| 75 | self.assertFalse(mat.create_class_file('not_writtable', False, True)) | 75 | self.assertFalse(mat.create_class_file('not_writtable', False, add2archive=True, low_pdf_quality=True)) |
| 76 | 76 | ||
| 77 | def test_not_exist(self): | 77 | def test_not_exist(self): |
| 78 | self.assertFalse(mat.create_class_file('ilikecookies', False, True)) | 78 | self.assertFalse(mat.create_class_file('ilikecookies', False, add2archive=True, low_pdf_quality=True)) |
| 79 | 79 | ||
| 80 | 80 | ||
| 81 | def get_tests(): | 81 | def get_tests(): |
