def test_parent_process_alive(os): """ Test worker processes recognize when parent process is alive """ os.getppid.return_value = 1234 worker = BaseWorker() worker.parent_is_alive().should.be.true
def test_parent_process_death(os): """ Test worker processes recognize parent process death """ os.getppid.return_value = 1 worker = BaseWorker() worker.parent_is_alive().should.be.false