Create a worker for testing.
(self)
| 463 | """Tests for keep-alive configuration.""" |
| 464 | |
| 465 | def create_worker(self): |
| 466 | """Create a worker for testing.""" |
| 467 | cfg = Config() |
| 468 | cfg.set('workers', 1) |
| 469 | |
| 470 | worker = gtornado.TornadoWorker( |
| 471 | age=1, |
| 472 | ppid=os.getpid(), |
| 473 | sockets=[], |
| 474 | app=mock.Mock(), |
| 475 | timeout=30, |
| 476 | cfg=cfg, |
| 477 | log=mock.Mock(), |
| 478 | ) |
| 479 | return worker |
| 480 | |
| 481 | def test_keep_alive_enabled(self): |
| 482 | """Test that keep-alive is enabled when keepalive > 0.""" |
no test coverage detected