Beispiel #1
0
    def testSuccess(self):
        script = tssbtest_path('simple.txt')
        script = script.replace('/', '\\')
        run_tssb(script)

        ref = tssbtest_path('ref_audit.log')
        targ = tssbtest_path('AUDIT.LOG')
        self.assertTrue(testutil.file_compare(ref, targ))
Beispiel #2
0
 def testSuccess(self):
     script = tssbtest_path('simple.txt')
     script = script.replace('/','\\')
     run_tssb(script)
     
     ref = tssbtest_path('ref_audit.log')
     targ = tssbtest_path('AUDIT.LOG')
     self.assertTrue(testutil.file_compare(ref, targ))
Beispiel #3
0
 def run_tssb_wrapper(self, script, log):
     filepath = os.path.join(os.getcwd(), script)
     run_tssb(filepath)
 
     if not os.path.exists('AUDIT.LOG'):
         raise Exception("TSSB did not appear to write an AUDIT.log file!!")
     
     if os.path.exists(log):
         os.remove(log)
     os.rename('AUDIT.LOG',log)
Beispiel #4
0
    def run_tssb_wrapper(self, script, log):
        filepath = os.path.join(os.getcwd(), script)
        run_tssb(filepath)

        if not os.path.exists('AUDIT.LOG'):
            raise Exception("TSSB did not appear to write an AUDIT.log file!!")

        if os.path.exists(log):
            os.remove(log)
        os.rename('AUDIT.LOG', log)
Beispiel #5
0
 def testOtherError(self):
     script = tssbtest_path('error2.txt')
     script = script.replace('/','\\')
     with self.assertRaisesRegexp(Exception,'TSSB found errors in'):
         run_tssb(script)
Beispiel #6
0
 def testSyntaxError(self):
     script = tssbtest_path('error.txt')
     script = script.replace('/','\\')
     with self.assertRaisesRegexp(Exception,'TSSB found a syntax error in'):
         run_tssb(script)
Beispiel #7
0
 def testScriptNotFound(self):
     script = tssbtest_path('foobar')
     script = script.replace('/','\\')
     with self.assertRaisesRegexp(Exception,'TSSB could not find script file'):
         run_tssb(script)
Beispiel #8
0
 def testTSSBNotFound(self):
     script = tssbtest_path('simple.txt')
     script = script.replace('/','\\')
     with self.assertRaises(pywinauto.application.AppStartError):
         run_tssb(script,tssb_path='NOT_A_PATH\\tssb64.exe')
Beispiel #9
0
 def testOtherError(self):
     script = tssbtest_path('error2.txt')
     script = script.replace('/', '\\')
     with self.assertRaisesRegexp(Exception, 'TSSB found errors in'):
         run_tssb(script)
Beispiel #10
0
 def testSyntaxError(self):
     script = tssbtest_path('error.txt')
     script = script.replace('/', '\\')
     with self.assertRaisesRegexp(Exception,
                                  'TSSB found a syntax error in'):
         run_tssb(script)
Beispiel #11
0
 def testScriptNotFound(self):
     script = tssbtest_path('foobar')
     script = script.replace('/', '\\')
     with self.assertRaisesRegexp(Exception,
                                  'TSSB could not find script file'):
         run_tssb(script)
Beispiel #12
0
 def testTSSBNotFound(self):
     script = tssbtest_path('simple.txt')
     script = script.replace('/', '\\')
     with self.assertRaises(pywinauto.application.AppStartError):
         run_tssb(script, tssb_path='NOT_A_PATH\\tssb64.exe')