summaryrefslogtreecommitdiff
path: root/test/clitest.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/clitest.py')
-rw-r--r--test/clitest.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/clitest.py b/test/clitest.py
index da0563f..7606c1e 100644
--- a/test/clitest.py
+++ b/test/clitest.py
@@ -6,6 +6,7 @@
6import unittest 6import unittest
7import subprocess 7import subprocess
8import sys 8import sys
9
9sys.path.append('..') 10sys.path.append('..')
10import cli 11import cli
11from lib import mat 12from lib import mat
@@ -17,7 +18,7 @@ class Test_Remove_cli(test.MATTest):
17 for clean, dirty in self.file_list: 18 for clean, dirty in self.file_list:
18 subprocess.call(['../cli.py', dirty]) 19 subprocess.call(['../cli.py', dirty])
19 current_file = mat.create_class_file(dirty) 20 current_file = mat.create_class_file(dirty)
20 self.assertTrue(current_file.is_clean()) 21 self.assertFalse(current_file.is_clean())
21 22
22 def test_remove_empty(self): 23 def test_remove_empty(self):
23 '''Test removal with clean files''' 24 '''Test removal with clean files'''
@@ -31,11 +32,10 @@ class Test_List_cli(test.MATTest):
31 def test_list_clean(self): 32 def test_list_clean(self):
32 '''check if get_meta returns meta''' 33 '''check if get_meta returns meta'''
33 for clean, dirty in self.file_list: 34 for clean, dirty in self.file_list:
34 #fixme : a (clean|dirty).(jpg|pdf|...).out ?
35 proc = subprocess.Popen(['../cli.py', '-d', clean], 35 proc = subprocess.Popen(['../cli.py', '-d', clean],
36 stdout=subprocess.PIPE) 36 stdout=subprocess.PIPE)
37 stdout, stderr = proc.communicate() 37 stdout, stderr = proc.communicate()
38 self.assertEqual(stdout, "[+] File %s" % clean) 38 self.assertEqual(stdout.strip('\n'), "[+] File %s :" % clean)
39 39
40 def test_list_dirty(self): 40 def test_list_dirty(self):
41 '''check if get_meta returns all the expected meta''' 41 '''check if get_meta returns all the expected meta'''