Esempio n. 1
0
def request_one_block_with_size_change(context):
    request = Request("unit-test-request")

    block = Block(name="unit-test-block", request=Request)
    request.push(block)

    size_changing_block = SizeChangingBlock(name="size-changing-block")
    request.push(size_changing_block)

    request.pop()

    size = Size(block_name="size-changing-block", request=request, fuzzable=True, name="Size block")
    request.push(size)

    context.uut = size
    context.block = block
    context.request = request
Esempio n. 2
0
def request_one_block(context):
    request = Request("unit-test-request")

    block = Block(name="unit-test-block", request=Request)
    request.push(block)

    byte1 = Byte(0x01, name="Byte block 1")
    byte2 = Byte(0x02, name="Byte block 2")
    request.push(byte1)
    request.push(byte2)

    request.pop()

    size = Size(block_name="unit-test-block", request=request, fuzzable=True, name="Size block")
    request.push(size)

    context.uut = size