diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/clitest.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/clitest.py b/test/clitest.py index c913bdf..8d48624 100644 --- a/test/clitest.py +++ b/test/clitest.py | |||
| @@ -98,20 +98,20 @@ class TestFileAttributes(unittest.TestCase): | |||
| 98 | proc = subprocess.Popen([MAT_PATH, 'not_writtable'], | 98 | proc = subprocess.Popen([MAT_PATH, 'not_writtable'], |
| 99 | stdout=subprocess.PIPE) | 99 | stdout=subprocess.PIPE) |
| 100 | stdout, _ = proc.communicate() | 100 | stdout, _ = proc.communicate() |
| 101 | self.assertEqual(str(stdout).strip('\n'), '[-] %s is not writable' % 'not_writtable') | 101 | self.assertEqual(str(stdout).strip('\n'), '[-] Unable to process not_writtable') |
| 102 | 102 | ||
| 103 | def test_not_exist(self): | 103 | def test_not_exist(self): |
| 104 | """ test MAT's behaviour on non-existent file""" | 104 | """ test MAT's behaviour on non-existent file""" |
| 105 | proc = subprocess.Popen([MAT_PATH, 'ilikecookies'], | 105 | proc = subprocess.Popen([MAT_PATH, 'ilikecookies'], |
| 106 | stdout=subprocess.PIPE) | 106 | stdout=subprocess.PIPE) |
| 107 | stdout, _ = proc.communicate() | 107 | stdout, _ = proc.communicate() |
| 108 | self.assertEqual(str(stdout).strip('\n'), 'Unable to process %s' % 'ilikecookies') | 108 | self.assertEqual(str(stdout).strip('\n'), '[-] Unable to process ilikecookies') |
| 109 | 109 | ||
| 110 | def test_empty(self): | 110 | def test_empty(self): |
| 111 | """ test MAT's behaviour on empty file""" | 111 | """ test MAT's behaviour on empty file""" |
| 112 | proc = subprocess.Popen([MAT_PATH, 'empty_file'], stdout=subprocess.PIPE) | 112 | proc = subprocess.Popen([MAT_PATH, 'empty_file'], stdout=subprocess.PIPE) |
| 113 | stdout, _ = proc.communicate() | 113 | stdout, _ = proc.communicate() |
| 114 | self.assertEqual(str(stdout).strip('\n'), 'Unable to process %s' % 'ilikecookies') | 114 | self.assertEqual(str(stdout).strip('\n'), '[-] Unable to process empty_file') |
| 115 | 115 | ||
| 116 | 116 | ||
| 117 | class TestUnsupported(test.MATTest): | 117 | class TestUnsupported(test.MATTest): |
| @@ -137,4 +137,5 @@ def get_tests(): | |||
| 137 | suite.addTest(unittest.makeSuite(TestListcli)) | 137 | suite.addTest(unittest.makeSuite(TestListcli)) |
| 138 | suite.addTest(unittest.makeSuite(TestisCleancli)) | 138 | suite.addTest(unittest.makeSuite(TestisCleancli)) |
| 139 | suite.addTest(unittest.makeSuite(TestUnsupported)) | 139 | suite.addTest(unittest.makeSuite(TestUnsupported)) |
| 140 | suite.addTest(unittest.makeSuite(TestFileAttributes)) | ||
| 140 | return suite | 141 | return suite |
