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))
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))
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)
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)
def testOtherError(self): script = tssbtest_path('error2.txt') script = script.replace('/','\\') with self.assertRaisesRegexp(Exception,'TSSB found errors in'): run_tssb(script)
def testSyntaxError(self): script = tssbtest_path('error.txt') script = script.replace('/','\\') with self.assertRaisesRegexp(Exception,'TSSB found a syntax error in'): run_tssb(script)
def testScriptNotFound(self): script = tssbtest_path('foobar') script = script.replace('/','\\') with self.assertRaisesRegexp(Exception,'TSSB could not find script file'): run_tssb(script)
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')
def testOtherError(self): script = tssbtest_path('error2.txt') script = script.replace('/', '\\') with self.assertRaisesRegexp(Exception, 'TSSB found errors in'): run_tssb(script)
def testSyntaxError(self): script = tssbtest_path('error.txt') script = script.replace('/', '\\') with self.assertRaisesRegexp(Exception, 'TSSB found a syntax error in'): run_tssb(script)
def testScriptNotFound(self): script = tssbtest_path('foobar') script = script.replace('/', '\\') with self.assertRaisesRegexp(Exception, 'TSSB could not find script file'): run_tssb(script)
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')