Create a worker for testing.
(self)
| 182 | """Tests for watchdog functionality.""" |
| 183 | |
| 184 | def create_worker(self): |
| 185 | """Create a worker for testing.""" |
| 186 | cfg = Config() |
| 187 | cfg.set('workers', 1) |
| 188 | |
| 189 | worker = gtornado.TornadoWorker( |
| 190 | age=1, |
| 191 | ppid=os.getpid(), |
| 192 | sockets=[], |
| 193 | app=mock.Mock(), |
| 194 | timeout=30, |
| 195 | cfg=cfg, |
| 196 | log=mock.Mock(), |
| 197 | ) |
| 198 | return worker |
| 199 | |
| 200 | def test_watchdog_notifies_when_alive(self): |
| 201 | """Test that watchdog calls notify when alive.""" |
no test coverage detected