summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/clitest.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/clitest.py b/test/clitest.py
index 781fb80..c2d11af 100644
--- a/test/clitest.py
+++ b/test/clitest.py
@@ -18,14 +18,14 @@ class TestRemovecli(test.MATTest):
18 def test_remove(self): 18 def test_remove(self):
19 '''make sure that the cli remove all compromizing meta''' 19 '''make sure that the cli remove all compromizing meta'''
20 for _, dirty in self.file_list: 20 for _, dirty in self.file_list:
21 subprocess.call(['../cli.py', dirty]) 21 subprocess.call(['../mat-cli.py', dirty])
22 current_file = mat.create_class_file(dirty, False, True) 22 current_file = mat.create_class_file(dirty, False, True)
23 self.assertTrue(current_file.is_clean()) 23 self.assertTrue(current_file.is_clean())
24 24
25 def test_remove_empty(self): 25 def test_remove_empty(self):
26 '''Test removal with clean files''' 26 '''Test removal with clean files'''
27 for clean, _ in self.file_list: 27 for clean, _ in self.file_list:
28 subprocess.call(['../cli.py', clean]) 28 subprocess.call(['../mat-cli.py', clean])
29 current_file = mat.create_class_file(clean, False, True) 29 current_file = mat.create_class_file(clean, False, True)
30 self.assertTrue(current_file.is_clean()) 30 self.assertTrue(current_file.is_clean())
31 31
@@ -37,7 +37,7 @@ class TestListcli(test.MATTest):
37 def test_list_clean(self): 37 def test_list_clean(self):
38 '''check if get_meta returns meta''' 38 '''check if get_meta returns meta'''
39 for clean, _ in self.file_list: 39 for clean, _ in self.file_list:
40 proc = subprocess.Popen(['../cli.py', '-d', clean], 40 proc = subprocess.Popen(['../mat-cli.py', '-d', clean],
41 stdout=subprocess.PIPE) 41 stdout=subprocess.PIPE)
42 stdout, _ = proc.communicate() 42 stdout, _ = proc.communicate()
43 self.assertEqual(stdout.strip('\n'), "[+] File %s :\nNo harmful \ 43 self.assertEqual(stdout.strip('\n'), "[+] File %s :\nNo harmful \
@@ -46,7 +46,7 @@ meta found" % clean)
46 def test_list_dirty(self): 46 def test_list_dirty(self):
47 '''check if get_meta returns all the expected meta''' 47 '''check if get_meta returns all the expected meta'''
48 for _, dirty in self.file_list: 48 for _, dirty in self.file_list:
49 proc = subprocess.Popen(['../cli.py', '-d', dirty], 49 proc = subprocess.Popen(['../mat-cli.py', '-d', dirty],
50 stdout=subprocess.PIPE) 50 stdout=subprocess.PIPE)
51 stdout, _ = proc.communicate() 51 stdout, _ = proc.communicate()
52 self.assertNotEqual(stdout, "[+] File %s" % dirty) 52 self.assertNotEqual(stdout, "[+] File %s" % dirty)
@@ -59,7 +59,7 @@ class TestisCleancli(test.MATTest):
59 def test_clean(self): 59 def test_clean(self):
60 '''test is_clean on clean files''' 60 '''test is_clean on clean files'''
61 for clean, _ in self.file_list: 61 for clean, _ in self.file_list:
62 proc = subprocess.Popen(['../cli.py', '-c', clean], 62 proc = subprocess.Popen(['../mat-cli.py', '-c', clean],
63 stdout=subprocess.PIPE) 63 stdout=subprocess.PIPE)
64 stdout, _ = proc.communicate() 64 stdout, _ = proc.communicate()
65 self.assertEqual(stdout.strip('\n'), '[+] %s is clean' % clean) 65 self.assertEqual(stdout.strip('\n'), '[+] %s is clean' % clean)
@@ -67,7 +67,7 @@ class TestisCleancli(test.MATTest):
67 def test_dirty(self): 67 def test_dirty(self):
68 '''test is_clean on dirty files''' 68 '''test is_clean on dirty files'''
69 for _, dirty in self.file_list: 69 for _, dirty in self.file_list:
70 proc = subprocess.Popen(['../cli.py', '-c', dirty], 70 proc = subprocess.Popen(['../mat-cli.py', '-c', dirty],
71 stdout=subprocess.PIPE) 71 stdout=subprocess.PIPE)
72 stdout, _ = proc.communicate() 72 stdout, _ = proc.communicate()
73 self.assertEqual(stdout.strip('\n'), '[+] %s is not clean' % dirty) 73 self.assertEqual(stdout.strip('\n'), '[+] %s is not clean' % dirty)