コード例 #1
0
ファイル: test_run.py プロジェクト: backchenlin/psdash
 def test_reload_logs(self):
     _, filename = tempfile.mkstemp()
     r = PsDashRunner.create_from_args(['-l', filename])
     pre_count = len(r.app.psdash.logs.available)
     c = r.reload_logs()
     post_count = len(r.app.psdash.logs.available)
     self.assertEqual(pre_count, post_count)
コード例 #2
0
 def test_reload_logs(self):
     _, filename = tempfile.mkstemp()
     r = PsDashRunner.create_from_args(['-l', filename])
     pre_count = len(r.app.psdash.logs.available)
     r.reload_logs()
     post_count = len(r.app.psdash.logs.available)
     self.assertEqual(pre_count, post_count)
コード例 #3
0
ファイル: test_run.py プロジェクト: backchenlin/psdash
 def test_args_log(self):
     _, filename = tempfile.mkstemp()
     r = PsDashRunner.create_from_args(['-l', filename])
     self.assertEqual(r.app.config['PSDASH_LOGS'][0], filename)
コード例 #4
0
ファイル: test_run.py プロジェクト: backchenlin/psdash
 def test_args_debug(self):
     r = PsDashRunner.create_from_args(['-d'])
     self.assertTrue(r.app.debug)
コード例 #5
0
ファイル: test_run.py プロジェクト: backchenlin/psdash
 def test_args_port(self):
     r = PsDashRunner.create_from_args(['-p', '5555'])
     self.assertEqual(r.app.config['PSDASH_PORT'], 5555)
コード例 #6
0
ファイル: test_run.py プロジェクト: backchenlin/psdash
 def test_args_bind(self):
     r = PsDashRunner.create_from_args(['-b', '10.0.0.1'])
     self.assertEqual(r.app.config['PSDASH_BIND_HOST'], '10.0.0.1')
コード例 #7
0
 def test_args_log(self):
     _, filename = tempfile.mkstemp()
     r = PsDashRunner.create_from_args(['-l', filename])
     self.assertEqual(r.app.config['PSDASH_LOGS'][0], filename)
コード例 #8
0
 def test_args_debug(self):
     r = PsDashRunner.create_from_args(['-d'])
     self.assertTrue(r.app.debug)
コード例 #9
0
 def test_args_port(self):
     r = PsDashRunner.create_from_args(['-p', '5555'])
     self.assertEqual(r.app.config['PSDASH_PORT'], 5555)
コード例 #10
0
 def test_args_bind(self):
     r = PsDashRunner.create_from_args(['-b', '10.0.0.1'])
     self.assertEqual(r.app.config['PSDASH_BIND_HOST'], '10.0.0.1')
コード例 #11
0
ファイル: passenger_wsgi.py プロジェクト: tummychow/typhon
from psdash.run import PsDashRunner
application = PsDashRunner.create_from_args().app

application.config['SECRET_KEY'] = 'ravioliravioligivemetheformuoli'
application.psdash.logs.add_patterns(['/var/log/nginx/access.log'])