Esempio n. 1
0
def test_daemon_not_passed():
    with TestApp(extensions=['daemon']) as app:
        app.config.set('daemon', 'pid_file', None)

        try:
            app.run()
        finally:
            ext_daemon.cleanup(app)
Esempio n. 2
0
def test_daemon_not_passed():
    with TestApp(extensions=['daemon']) as app:
        app.config.set('daemon', 'pid_file', None)

        try:
            app.run()
        finally:
            ext_daemon.cleanup(app)
Esempio n. 3
0
    def test_daemon_not_passed(self):
        app = self.make_app(APP, extensions=['daemon'])

        app.setup()
        app.config.set('daemon', 'pid_file', None)

        try:
            app.run()
        finally:
            ext_daemon.cleanup(app)
Esempio n. 4
0
    def test_daemon_not_passed(self):
        app = self.make_app(APP, extensions=['daemon'])

        app.setup()
        app.config.set('daemon', 'pid_file', None)

        try:
            app.run()
        finally:
            ext_daemon.cleanup(app)
Esempio n. 5
0
    def target():
        with TestApp(argv=['--daemon'], extensions=['daemon']) as app:
            app.config.set('daemon', 'pid_file', tmp.file)

            try:
                # FIX ME: Can't daemonize, because nose/pytest lose sight of it
                app.daemonize()
                app.run()
            finally:
                app.close()
                ext_daemon.cleanup(app)
Esempio n. 6
0
    def target():
        with TestApp(argv=['--daemon'], extensions=['daemon']) as app:
            app.config.set('daemon', 'pid_file', tmp.file)

            try:
                # FIX ME: Can't daemonize, because nose/pytest lose sight of it
                app.daemonize()
                app.run()
            finally:
                app.close()
                ext_daemon.cleanup(app)
Esempio n. 7
0
        def target():
            app = self.make_app('test', argv=['--daemon'],
                                extensions=['daemon'])

            app.setup()
            app.config.set('daemon', 'pid_file', self.tmp_file)

            try:
                # FIX ME: Can't daemonize, because nose loses sight of it
                app.daemonize()
                app.run()
            finally:
                app.close()
                ext_daemon.cleanup(app)
Esempio n. 8
0
        def target():
            app = self.make_app('test', argv=['--daemon'],
                                extensions=['daemon'])

            app.setup()
            app.config.set('daemon', 'pid_file', tmpfile)

            try:
                ### FIX ME: Can't daemonize, because nose loses sight of it
                app.daemonize()
                app.run()
            finally:
                app.close()
                ext_daemon.cleanup(app)
Esempio n. 9
0
    def test_daemon(self):
        (_, tmpfile) = tempfile.mkstemp()
        os.remove(tmpfile)

        app = self.make_app('test', argv=['--daemon'], extensions=['daemon'])

        app.setup()
        app.config.set('daemon', 'pid_file', tmpfile)

        try:
            ### FIX ME: Can't daemonize, because nose loses sight of it
            #app.daemonize()
            app.run()
        finally:
            app.close()
            ext_daemon.cleanup(app)