diff options
| author | jvoisin | 2011-08-16 18:43:58 +0200 |
|---|---|---|
| committer | jvoisin | 2011-08-16 18:43:58 +0200 |
| commit | 9f8dab3209e42a7b69a8a7a1ae100d707a4fc558 (patch) | |
| tree | 3170b8474d858eacc25d0df58f3e8535c8432bac /test | |
| parent | 7cdd87a2eeea35aa4fa5fccb7e0ee31a88d8611a (diff) | |
Change test according to previous commit
Diffstat (limited to 'test')
| -rw-r--r-- | test/clitest.py | 12 |
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) |
