summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorjvoisin2012-12-25 01:48:38 +0100
committerjvoisin2012-12-25 01:48:38 +0100
commit5fd8f1dbb84370c90343e5112951ef5cbea0e3c7 (patch)
treeaf93d15204e40030fc18cb083d10f098800f2fa9 /test
parentfb167b988f7e7f578b03449ad2dc75c9413f39b1 (diff)
Partial fix of the testsuite
Diffstat (limited to 'test')
-rw-r--r--test/clitest.py4
-rw-r--r--test/libtest.py18
2 files changed, 11 insertions, 11 deletions
diff --git a/test/clitest.py b/test/clitest.py
index 0b041b9..bc0a7fd 100644
--- a/test/clitest.py
+++ b/test/clitest.py
@@ -22,14 +22,14 @@ class TestRemovecli(test.MATTest):
22 '''make sure that the cli remove all compromizing meta''' 22 '''make sure that the cli remove all compromizing meta'''
23 for _, dirty in self.file_list: 23 for _, dirty in self.file_list:
24 subprocess.call(['../mat', dirty]) 24 subprocess.call(['../mat', dirty])
25 current_file = mat.create_class_file(dirty, False, True) 25 current_file = mat.create_class_file(dirty, False, add2archive=True, low_pdf_quality=True)
26 self.assertTrue(current_file.is_clean()) 26 self.assertTrue(current_file.is_clean())
27 27
28 def test_remove_empty(self): 28 def test_remove_empty(self):
29 '''Test removal with clean files''' 29 '''Test removal with clean files'''
30 for clean, _ in self.file_list: 30 for clean, _ in self.file_list:
31 subprocess.call(['../mat', clean]) 31 subprocess.call(['../mat', clean])
32 current_file = mat.create_class_file(clean, False, True) 32 current_file = mat.create_class_file(clean, False, add2archive=True, low_pdf_quality=True)
33 self.assertTrue(current_file.is_clean()) 33 self.assertTrue(current_file.is_clean())
34 34
35 35
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
81def get_tests(): 81def get_tests():