Linux server.edchosting.com 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
LiteSpeed
Server IP : 75.98.162.185 & Your IP : 216.73.216.163
Domains :
Cant Read [ /etc/named.conf ]
User : goons4good
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python2.7 /
site-packages /
supervisor /
tests /
Delete
Unzip
Name
Size
Permission
Date
Action
fixtures
[ DIR ]
drwxr-xr-x
2024-07-29 10:18
__init__.py
20
B
-rw-r--r--
2020-03-10 20:45
__init__.pyc
148
B
-rw-r--r--
2020-03-10 20:45
__init__.pyo
148
B
-rw-r--r--
2020-03-10 20:45
base.py
33.88
KB
-rw-r--r--
2020-03-10 20:45
base.pyc
52.56
KB
-rw-r--r--
2020-03-10 20:45
base.pyo
52.56
KB
-rw-r--r--
2020-03-10 20:45
test_childutils.py
5.27
KB
-rw-r--r--
2020-03-10 20:45
test_childutils.pyc
7.63
KB
-rw-r--r--
2020-03-10 20:45
test_childutils.pyo
7.63
KB
-rw-r--r--
2020-03-10 20:45
test_confecho.py
540
B
-rw-r--r--
2020-03-10 20:45
test_confecho.pyc
1.25
KB
-rw-r--r--
2020-03-10 20:45
test_confecho.pyo
1.25
KB
-rw-r--r--
2020-03-10 20:45
test_datatypes.py
26.65
KB
-rw-r--r--
2020-03-10 20:45
test_datatypes.pyc
47.5
KB
-rw-r--r--
2020-03-10 20:45
test_datatypes.pyo
47.5
KB
-rw-r--r--
2020-03-10 20:45
test_dispatchers.py
47.68
KB
-rw-r--r--
2020-03-10 20:45
test_dispatchers.pyc
47.49
KB
-rw-r--r--
2020-03-10 20:45
test_dispatchers.pyo
47.49
KB
-rw-r--r--
2020-03-10 20:45
test_events.py
20.35
KB
-rw-r--r--
2020-03-10 20:45
test_events.pyc
24.96
KB
-rw-r--r--
2020-03-10 20:45
test_events.pyo
24.96
KB
-rw-r--r--
2020-03-10 20:45
test_http.py
24.48
KB
-rw-r--r--
2020-03-10 20:45
test_http.pyc
34.38
KB
-rw-r--r--
2020-03-10 20:45
test_http.pyo
34.38
KB
-rw-r--r--
2020-03-10 20:45
test_loggers.py
12.65
KB
-rw-r--r--
2020-03-10 20:45
test_loggers.pyc
18.18
KB
-rw-r--r--
2020-03-10 20:45
test_loggers.pyo
18.18
KB
-rw-r--r--
2020-03-10 20:45
test_options.py
132.88
KB
-rw-r--r--
2020-03-10 20:45
test_options.pyc
136.01
KB
-rw-r--r--
2020-03-10 20:45
test_options.pyo
136.01
KB
-rw-r--r--
2020-03-10 20:45
test_poller.py
16.29
KB
-rw-r--r--
2020-03-10 20:45
test_poller.pyc
20.74
KB
-rw-r--r--
2020-03-10 20:45
test_poller.pyo
20.5
KB
-rw-r--r--
2020-03-10 20:45
test_process.py
91.59
KB
-rw-r--r--
2020-03-10 20:45
test_process.pyc
93.63
KB
-rw-r--r--
2020-03-10 20:45
test_process.pyo
93.63
KB
-rw-r--r--
2020-03-10 20:45
test_rpcinterfaces.py
94.86
KB
-rw-r--r--
2020-03-10 20:45
test_rpcinterfaces.pyc
80.93
KB
-rw-r--r--
2020-03-10 20:45
test_rpcinterfaces.pyo
80.93
KB
-rw-r--r--
2020-03-10 20:45
test_socket_manager.py
7.84
KB
-rw-r--r--
2020-03-10 20:45
test_socket_manager.pyc
11.29
KB
-rw-r--r--
2020-03-10 20:45
test_socket_manager.pyo
11.29
KB
-rw-r--r--
2020-03-10 20:45
test_states.py
2.22
KB
-rw-r--r--
2020-03-10 20:45
test_states.pyc
4.4
KB
-rw-r--r--
2020-03-10 20:45
test_states.pyo
4.4
KB
-rw-r--r--
2020-03-10 20:45
test_supervisorctl.py
66.26
KB
-rw-r--r--
2020-03-10 20:45
test_supervisorctl.pyc
87.29
KB
-rw-r--r--
2020-03-10 20:45
test_supervisorctl.pyo
87.29
KB
-rw-r--r--
2020-03-10 20:45
test_supervisord.py
29.39
KB
-rw-r--r--
2020-03-10 20:45
test_supervisord.pyc
27.4
KB
-rw-r--r--
2020-03-10 20:45
test_supervisord.pyo
27.4
KB
-rw-r--r--
2020-03-10 20:45
test_web.py
6.67
KB
-rw-r--r--
2020-03-10 20:45
test_web.pyc
9.52
KB
-rw-r--r--
2020-03-10 20:45
test_web.pyo
9.52
KB
-rw-r--r--
2020-03-10 20:45
test_xmlrpc.py
34.05
KB
-rw-r--r--
2020-03-10 20:45
test_xmlrpc.pyc
47.64
KB
-rw-r--r--
2020-03-10 20:45
test_xmlrpc.pyo
47.64
KB
-rw-r--r--
2020-03-10 20:45
Save
Rename
import sys import unittest from supervisor.tests.base import DummySupervisor from supervisor.tests.base import DummyRequest class DeferredWebProducerTests(unittest.TestCase): def _getTargetClass(self): from supervisor.web import DeferredWebProducer return DeferredWebProducer def _makeOne(self, request, callback): producer = self._getTargetClass()(request, callback) return producer def test_ctor(self): request = DummyRequest('/index.html', [], '', '') callback = lambda *x: None callback.delay = 1 producer = self._makeOne(request, callback) self.assertEqual(producer.callback, callback) self.assertEqual(producer.request, request) self.assertEqual(producer.finished, False) self.assertEqual(producer.delay, 1) def test_more_not_done_yet(self): request = DummyRequest('/index.html', [], '', '') from supervisor.http import NOT_DONE_YET callback = lambda *x: NOT_DONE_YET callback.delay = 1 producer = self._makeOne(request, callback) self.assertEqual(producer.more(), NOT_DONE_YET) def test_more_exception_caught(self): request = DummyRequest('/index.html', [], '', '') def callback(*arg): raise ValueError('foo') callback.delay = 1 producer = self._makeOne(request, callback) self.assertEqual(producer.more(), None) logdata = request.channel.server.logger.logged self.assertEqual(len(logdata), 1) logged = logdata[0] self.assertEqual(logged[0], 'Web interface error') self.assertTrue(logged[1].startswith('Traceback'), logged[1]) self.assertEqual(producer.finished, True) self.assertEqual(request._error, 500) def test_sendresponse_redirect(self): request = DummyRequest('/index.html', [], '', '') callback = lambda *arg: None callback.delay = 1 producer = self._makeOne(request, callback) response = {'headers': {'Location':'abc'}} result = producer.sendresponse(response) self.assertEqual(result, None) self.assertEqual(request._error, 301) self.assertEqual(request.headers['Content-Type'], 'text/plain') self.assertEqual(request.headers['Content-Length'], 0) def test_sendresponse_withbody_and_content_type(self): request = DummyRequest('/index.html', [], '', '') callback = lambda *arg: None callback.delay = 1 producer = self._makeOne(request, callback) response = {'body': 'abc', 'headers':{'Content-Type':'text/html'}} result = producer.sendresponse(response) self.assertEqual(result, None) self.assertEqual(request.headers['Content-Type'], 'text/html') self.assertEqual(request.headers['Content-Length'], 3) self.assertEqual(request.producers[0], 'abc') class UIHandlerTests(unittest.TestCase): def _getTargetClass(self): from supervisor.web import supervisor_ui_handler return supervisor_ui_handler def _makeOne(self): supervisord = DummySupervisor() handler = self._getTargetClass()(supervisord) return handler def test_handle_request_no_view_method(self): request = DummyRequest('/foo.css', [], '', '', {'PATH_INFO':'/foo.css'}) handler = self._makeOne() data = handler.handle_request(request) self.assertEqual(data, None) def test_handle_request_default(self): request = DummyRequest('/index.html', [], '', '', {'PATH_INFO':'/index.html'}) handler = self._makeOne() data = handler.handle_request(request) self.assertEqual(data, None) self.assertEqual(request.channel.producer.request, request) from supervisor.web import StatusView self.assertEqual(request.channel.producer.callback.__class__,StatusView) def test_handle_request_index_html(self): request = DummyRequest('/index.html', [], '', '', {'PATH_INFO':'/index.html'}) handler = self._makeOne() handler.handle_request(request) from supervisor.web import StatusView view = request.channel.producer.callback self.assertEqual(view.__class__, StatusView) self.assertEqual(view.context.template, 'ui/status.html') def test_handle_request_tail_html(self): request = DummyRequest('/tail.html', [], '', '', {'PATH_INFO':'/tail.html'}) handler = self._makeOne() handler.handle_request(request) from supervisor.web import TailView view = request.channel.producer.callback self.assertEqual(view.__class__, TailView) self.assertEqual(view.context.template, 'ui/tail.html') def test_handle_request_ok_html(self): request = DummyRequest('/tail.html', [], '', '', {'PATH_INFO':'/ok.html'}) handler = self._makeOne() handler.handle_request(request) from supervisor.web import OKView view = request.channel.producer.callback self.assertEqual(view.__class__, OKView) self.assertEqual(view.context.template, None) class StatusViewTests(unittest.TestCase): def _getTargetClass(self): from supervisor.web import StatusView return StatusView def _makeOne(self, context): klass = self._getTargetClass() return klass(context) def test_make_callback_noaction(self): context = DummyContext() context.supervisord = DummySupervisor() context.template = 'ui/status.html' context.form = {} view = self._makeOne(context) self.assertRaises(ValueError, view.make_callback, 'process', None) def test_render_noaction(self): context = DummyContext() context.supervisord = DummySupervisor() context.template = 'ui/status.html' context.request = DummyRequest('/foo', [], '', '') context.form = {} context.response = {} view = self._makeOne(context) data = view.render() self.assertTrue(data.startswith('<!DOCTYPE html PUBLIC'), data) def test_render_refresh(self): context = DummyContext() context.supervisord = DummySupervisor() context.template = 'ui/status.html' context.response = {} context.form = {'action':'refresh'} view = self._makeOne(context) data = view.render() from supervisor.http import NOT_DONE_YET self.assertTrue(data is NOT_DONE_YET, data) class DummyContext: pass def test_suite(): return unittest.findTestCases(sys.modules[__name__]) if __name__ == '__main__': unittest.main(defaultTest='test_suite')