From 11c09cfab5472cce3e97a3bc4c69fc87f24b4490 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 19 Aug 2011 16:53:40 +0200 Subject: Correct the testsuite according to the renaming of cli.py --- test/clitest.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'test') diff --git a/test/clitest.py b/test/clitest.py index c2d11af..ebb4ebc 100644 --- a/test/clitest.py +++ b/test/clitest.py @@ -13,31 +13,31 @@ import test class TestRemovecli(test.MATTest): ''' - test if cli.py correctly remove metadatas + test if cli correctly remove metadatas ''' def test_remove(self): '''make sure that the cli remove all compromizing meta''' for _, dirty in self.file_list: - subprocess.call(['../mat-cli.py', dirty]) + subprocess.call(['../mat-cli', 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.py', clean]) + subprocess.call(['../mat-cli', clean]) current_file = mat.create_class_file(clean, False, True) self.assertTrue(current_file.is_clean()) class TestListcli(test.MATTest): ''' - test if cli.py correctly display metadatas + test if cli correctly display metadatas ''' def test_list_clean(self): '''check if get_meta returns meta''' for clean, _ in self.file_list: - proc = subprocess.Popen(['../mat-cli.py', '-d', clean], + proc = subprocess.Popen(['../mat-cli', '-d', clean], stdout=subprocess.PIPE) stdout, _ = proc.communicate() self.assertEqual(stdout.strip('\n'), "[+] File %s :\nNo harmful \ @@ -46,7 +46,7 @@ meta 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.py', '-d', dirty], + proc = subprocess.Popen(['../mat-cli', '-d', dirty], stdout=subprocess.PIPE) stdout, _ = proc.communicate() self.assertNotEqual(stdout, "[+] File %s" % dirty) @@ -54,12 +54,12 @@ meta found" % clean) class TestisCleancli(test.MATTest): ''' - check if cli.py correctly check if a file is clean or not + check if cli correctly check if a file is clean or not ''' def test_clean(self): '''test is_clean on clean files''' for clean, _ in self.file_list: - proc = subprocess.Popen(['../mat-cli.py', '-c', clean], + proc = subprocess.Popen(['../mat-cli', '-c', clean], stdout=subprocess.PIPE) stdout, _ = proc.communicate() self.assertEqual(stdout.strip('\n'), '[+] %s is clean' % clean) @@ -67,7 +67,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.py', '-c', dirty], + proc = subprocess.Popen(['../mat-cli', '-c', dirty], stdout=subprocess.PIPE) stdout, _ = proc.communicate() self.assertEqual(stdout.strip('\n'), '[+] %s is not clean' % dirty) -- cgit v1.3