Exemplo n.º 1
0
def test_process_image_width():
    ctx = Context()
    ctx.image_max_width = 200
    ctx.image_extras = '{width="10cm"}'
    image._process_image_width(ctx)
    assert ctx.image_extras == '{width="100mm"}'
Exemplo n.º 2
0
def test_process_image_width_no_width_given():
    ctx = Context()
    ctx.image_max_width = 100
    ctx.image_extras = ''
    image._process_image_width(ctx)
    assert ctx.image_extras == '{width="100mm"}'