示例#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))
示例#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))
示例#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)
示例#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)
示例#5
0
 def testOtherError(self):
     script = tssbtest_path('error2.txt')
     script = script.replace('/','\\')
     with self.assertRaisesRegexp(Exception,'TSSB found errors in'):
         run_tssb(script)
示例#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)
示例#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)
示例#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')
示例#9
0
 def testOtherError(self):
     script = tssbtest_path('error2.txt')
     script = script.replace('/', '\\')
     with self.assertRaisesRegexp(Exception, 'TSSB found errors in'):
         run_tssb(script)
示例#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)
示例#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)
示例#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')