Ejemplo n.º 1
0
 def setUp(self):
     print '%s %s' % (self.id(), self.shortDescription())
     setupFitGlobalForTests("FitNesseOnline")
     self.savePath = copy.copy(sys.path)
     self.fits = fsi.ServerBase()
     self.options = Options(["fubar"], SiteOptions.FitServer.parmDict)
     self.saveNet = fsi.net
     fsi.netIn = fsi.netOut = fsi.net = ioMock()
     self.saveMsg = fsi.conMsg
     fsi.conMsg = fsi.TestMsgWriter()
Ejemplo n.º 2
0
 def setUp(self):
     print '%s %s' % (self.id(), self.shortDescription())
     setupFitGlobalForTests("FitNesseBatch")
     self.savePath = copy.copy(sys.path)
     self.saveMsg = fsi.conMsg
     fsi.conMsg = fsi.TestMsgWriter()
     FG.fsa = VirtualFileSystem()
     FG.fsa._addDirectories("tests/testout")
     self.trun = fsi.TestRunner()
     fsi.netIn = fsi.netOut = fsi.net = ioMock()
Ejemplo n.º 3
0
 def setUp(self):
     print '%s %s' % (self.id(), self.shortDescription())
     setupFitGlobalForTests("FitNesseOnline")
     if isinstance(fsi.conMsg, types.StringTypes):
         em("conMsg corrupt. %s" % fsi.conMsg)
     self.savePythonPath = copy.copy(sys.path)
     self.saveNet = fsi.net
     fsi.netIn = fsi.netOut = fsi.net = ioMock()
     self.saveMsg = fsi.conMsg
     fsi.conMsg = fsi.TestMsgWriter()
     self.fits = fsi.FitServer()
Ejemplo n.º 4
0
    def tearDown(self):
#        fsi.conMsg.logToStderr(self.id())
        fsi.conMsg = self.saveMsg
        FG.fsa = FileSystemAdapter()
        fsi.netIn = fsi.netOut = fsi.net = fsi.FitNesseNetworkInterface()
        sys.path[:] = self.savePath
        setupFitGlobalForTests("FitNesseBatch")
Ejemplo n.º 5
0
 def testTwoEndsOfPage(self):
     obj = fsi.StatsHandler("outputDir", "SuiteName", "localhost", 80)
     obj.endOfATest("pageTitle", Counts(), {})
     obj.endOfATest("secondPage", Counts(), {})
     assert len(obj._pageList) == 2
     assert obj._pageList[0][0] == "pageTitle"
     assert obj._pageList[1][0] == "secondPage"
Ejemplo n.º 6
0
 def testInvalidParms(self):
     trun = fsi.TestRunner()
     assert not trun.args(["TestRunner.py", "+vrw",
                       "-o", self._joinPath("fat", "Reports"),
                       "localhost",
                       "8080",
                       "AGreatTestPage"])
 def testTooManyPosParms(self):
     trun = fsi.TestRunner()
     assert not trun.args([
         "TestRunner.py", "+vr", "-o",
         self._joinPath("fat", "Reports"), "localhost", "8080",
         "AGreatTestPage", "An Extra Parm"
     ])
Ejemplo n.º 8
0
 def testGeneratedXML(self):
     obj = fsi.StatsHandler("outputDir", "SuiteName", "localhost", 80)
     obj.endOfATest("pageTitle", Counts(5, 0, 0, 0), {"fee": "fi"})
     obj.endOfATest("secondPage", Counts(6, 2, 0, 0), {"fo": "fum"})
     text = obj.endOfAllTests()
     assert text.startswith('<?xml version="1.0"?>')
     assert text.count("<right>") == 3
     print text
Ejemplo n.º 9
0
 def testParms2(self):
     trun = fsi.TestRunner()
     assert trun.args(["TestRunner.py", "+vr",
                       "-o", self._joinPath("fat", "Reports"),
                       "localhost",
                       "8080",
                       "AGreatTestPage"])
     self._checkParmSettings(trun, True, None, True, True, True, None)
Ejemplo n.º 10
0
 def testParms1(self):
     trun = fsi.TestRunner()
     assert trun.args(["TestRunner.py",
                       "+v",
                       "localhost",
                       "8080",
                       "AGreatTestPage"])
     self._checkParmSettings(trun, True, None, False, False, False, None)
 def testTooFewPosParms(self):
     trun = fsi.TestRunner()
     assert not trun.args([
         "TestRunner.py",
         "+vr",
         "-o",
         self._joinPath("fat", "Reports"),
         "localhost",
         "8080",
     ])
Ejemplo n.º 12
0
 def testInstantiation(self):
     obj = fsi.StatsHandler("outputDir", "SuiteName", "localhost", 80)
     assert obj._outDir == "outputDir"
     assert obj._suiteName == "SuiteName"
Ejemplo n.º 13
0
 def testInstantiation(self):
     fsi.TestRunner()
Ejemplo n.º 14
0
 def setUp(self):
     print '%s %s' % (self.id(), self.shortDescription())
     setupFitGlobalForTests("FitNesseBatch")
     self.saveMsg = fsi.conMsg
     fsi.conMsg = fsi.TestMsgWriter()