Show More
@@ -109,6 +109,7 b' class ThreadedHookCallbackDaemon(object)' | |||||
109 | return self |
|
109 | return self | |
110 |
|
110 | |||
111 | def __exit__(self, exc_type, exc_val, exc_tb): |
|
111 | def __exit__(self, exc_type, exc_val, exc_tb): | |
|
112 | log.debug('Callback daemon exiting now...') | |||
112 | self._stop() |
|
113 | self._stop() | |
113 |
|
114 | |||
114 | def _prepare(self): |
|
115 | def _prepare(self): | |
@@ -135,7 +136,7 b' class HttpHooksCallbackDaemon(ThreadedHo' | |||||
135 | POLL_INTERVAL = 0.1 |
|
136 | POLL_INTERVAL = 0.1 | |
136 |
|
137 | |||
137 | def _prepare(self): |
|
138 | def _prepare(self): | |
138 | log.debug("Preparing callback daemon and registering hook object") |
|
139 | log.debug("Preparing HTTP callback daemon and registering hook object") | |
139 |
|
140 | |||
140 | self._done = False |
|
141 | self._done = False | |
141 | self._daemon = TCPServer((self.IP_ADDRESS, 0), HooksHttpHandler) |
|
142 | self._daemon = TCPServer((self.IP_ADDRESS, 0), HooksHttpHandler) | |
@@ -177,6 +178,7 b' def prepare_callback_daemon(extras, prot' | |||||
177 | extras['hooks_uri'] = callback_daemon.hooks_uri |
|
178 | extras['hooks_uri'] = callback_daemon.hooks_uri | |
178 | extras['hooks_protocol'] = protocol |
|
179 | extras['hooks_protocol'] = protocol | |
179 |
|
180 | |||
|
181 | log.debug('Prepared a callback daemon: %s', callback_daemon) | |||
180 | return callback_daemon, extras |
|
182 | return callback_daemon, extras | |
181 |
|
183 | |||
182 |
|
184 |
@@ -181,7 +181,7 b' class TestHttpHooksCallbackDaemon(object' | |||||
181 |
|
181 | |||
182 | assert_message_in_log( |
|
182 | assert_message_in_log( | |
183 | caplog.records, |
|
183 | caplog.records, | |
184 | 'Preparing callback daemon and registering hook object', |
|
184 | 'Preparing HTTP callback daemon and registering hook object', | |
185 | levelno=logging.DEBUG, module='hooks_daemon') |
|
185 | levelno=logging.DEBUG, module='hooks_daemon') | |
186 |
|
186 | |||
187 | def test_prepare_inits_hooks_uri_and_logs_it( |
|
187 | def test_prepare_inits_hooks_uri_and_logs_it( |
General Comments 0
You need to be logged in to leave comments.
Login now