Пример #1
0
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
Пример #2
0
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
Пример #3
0
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
Пример #4
0
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