Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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