Cleans up the test server. This method should not be called manually, it is added to the cleanup queue in the _setup method already.
(self)
| 306 | return self.client, self.server |
| 307 | |
| 308 | def _cleanup(self): |
| 309 | """ |
| 310 | Cleans up the test server. This method should not be called manually, |
| 311 | it is added to the cleanup queue in the _setup method already. |
| 312 | """ |
| 313 | # if logout was called already we'd raise an exception trying to |
| 314 | # shutdown the client once again |
| 315 | if self.client is not None and self.client.state != 'LOGOUT': |
| 316 | self.client.shutdown() |
| 317 | # cleanup the server |
| 318 | self.server.shutdown() |
| 319 | self.server.server_close() |
| 320 | threading_helper.join_thread(self.thread) |
| 321 | # Explicitly clear the attribute to prevent dangling thread |
| 322 | self.thread = None |
| 323 | |
| 324 | def test_EOF_without_complete_welcome_message(self): |
| 325 | # http://bugs.python.org/issue5949 |
no test coverage detected