From 544fe9bf1782a027b3f31bf4c10a050d783e32ac Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 1 Feb 2012 22:56:04 +0100 Subject: Rename mat-cli to mat-gui --- test/clitest.py | 20 ++++++++++---------- test/libtest.py | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'test') diff --git a/test/clitest.py b/test/clitest.py index 9232745..5b0f0c3 100644 --- a/test/clitest.py +++ b/test/clitest.py @@ -8,7 +8,7 @@ import subprocess import sys sys.path.append('..') -from mat import mat +from lib import mat import test @@ -19,14 +19,14 @@ class TestRemovecli(test.MATTest): def test_remove(self): '''make sure that the cli remove all compromizing meta''' for _, dirty in self.file_list: - subprocess.call(['../mat-cli', dirty]) + subprocess.call(['../mat', dirty]) current_file = mat.create_class_file(dirty, False, True) self.assertTrue(current_file.is_clean()) def test_remove_empty(self): '''Test removal with clean files''' for clean, _ in self.file_list: - subprocess.call(['../mat-cli', clean]) + subprocess.call(['../mat', clean]) current_file = mat.create_class_file(clean, False, True) self.assertTrue(current_file.is_clean()) @@ -38,7 +38,7 @@ class TestListcli(test.MATTest): def test_list_clean(self): '''check if get_meta returns meta''' for clean, _ in self.file_list: - proc = subprocess.Popen(['../mat-cli', '-d', clean], + proc = subprocess.Popen(['../mat', '-d', clean], stdout=subprocess.PIPE) stdout, _ = proc.communicate() self.assertEqual(stdout.strip('\n'), "[+] File %s :\nNo harmful \ @@ -47,7 +47,7 @@ metadata found" % clean) def test_list_dirty(self): '''check if get_meta returns all the expected meta''' for _, dirty in self.file_list: - proc = subprocess.Popen(['../mat-cli', '-d', dirty], + proc = subprocess.Popen(['../mat', '-d', dirty], stdout=subprocess.PIPE) stdout, _ = proc.communicate() self.assertNotEqual(stdout, "[+] File %s" % dirty) @@ -60,7 +60,7 @@ class TestisCleancli(test.MATTest): def test_clean(self): '''test is_clean on clean files''' for clean, _ in self.file_list: - proc = subprocess.Popen(['../mat-cli', '-c', clean], + proc = subprocess.Popen(['../mat', '-c', clean], stdout=subprocess.PIPE) stdout, _ = proc.communicate() self.assertEqual(stdout.strip('\n'), '[+] %s is clean' % clean) @@ -68,7 +68,7 @@ class TestisCleancli(test.MATTest): def test_dirty(self): '''test is_clean on dirty files''' for _, dirty in self.file_list: - proc = subprocess.Popen(['../mat-cli', '-c', dirty], + proc = subprocess.Popen(['../mat', '-c', dirty], stdout=subprocess.PIPE) stdout, _ = proc.communicate() self.assertEqual(stdout.strip('\n'), '[+] %s is not clean' % dirty) @@ -79,19 +79,19 @@ class TestFileAttributes(unittest.TestCase): test various stuffs about files (readable, writable, exist, ...) ''' def test_not_readable(self): - proc = subprocess.Popen(['../mat-cli', 'not_readable'], + proc = subprocess.Popen(['../mat', 'not_readable'], stdout=subprocess.PIPE) stdout, _ = proc.communicate() self.assertEqual(stdout.strip('\n'), 'Unable to pocess %s' % 'not_readable') def test_not_writtable(self): - proc = subprocess.Popen(['../mat-cli', 'not_writtable'], + proc = subprocess.Popen(['../mat', 'not_writtable'], stdout=subprocess.PIPE) stdout, _ = proc.communicate() self.assertEqual(stdout.strip('\n'), 'Unable to pocess %s' % 'not_writtable') def test_not_exist(self): - proc = subprocess.Popen(['../mat-cli', 'ilikecookies'], + proc = subprocess.Popen(['../mat', 'ilikecookies'], stdout=subprocess.PIPE) stdout, _ = proc.communicate() self.assertEqual(stdout.strip('\n'), 'Unable to pocess %s' % 'ilikecookies') diff --git a/test/libtest.py b/test/libtest.py index 6217b69..9ac12c0 100644 --- a/test/libtest.py +++ b/test/libtest.py @@ -8,7 +8,7 @@ import unittest import test import sys sys.path.append('..') -from mat import mat +from lib import mat class TestRemovelib(test.MATTest): -- cgit v1.3