Beispiel #1
0
    def test_good_run(self):
        import ftprelayer
        self.mox.StubOutClassWithMocks(ftprelayer, 'Application')
        self.mox.StubOutWithMock(ftprelayer, 'log')
        app = ftprelayer.Application

        args = ['./ftprelayer', 'som_config']
        app.from_config(args[1]).AndReturn(app)
        ftprelayer.log.info("Starting app")
        app.start(True)
        app.stop()

        self.mox.ReplayAll()
        ftprelayer.main(args)
Beispiel #2
0
 def test_too_few_args(self):
     import ftprelayer
     self.assertEqual(-1, ftprelayer.main(['./ftprelayer']))