Create a worker for testing.
(self)
| 345 | class="st">""class="st">"Tests for the run method."class="st">"" |
| 346 | |
| 347 | def create_worker(self): |
| 348 | class="st">""class="st">"Create a worker for testing."class="st">"" |
| 349 | cfg = Config() |
| 350 | cfg.set(&class="cm">#x27;workers', 1) |
| 351 | cfg.set(&class="cm">#x27;keepalive', 2) |
| 352 | |
| 353 | worker = gtornado.TornadoWorker( |
| 354 | age=1, |
| 355 | ppid=os.getpid(), |
| 356 | sockets=[], |
| 357 | app=mock.Mock(), |
| 358 | timeout=30, |
| 359 | cfg=cfg, |
| 360 | log=mock.Mock(), |
| 361 | ) |
| 362 | return worker |
| 363 | |
| 364 | def test_run_sets_up_callbacks(self): |
| 365 | class="st">""class="st">"Test that run sets up periodic callbacks."class="st">"" |
no test coverage detected