def METHOD_NAME(env, token_client):
    r = token_client.post(
        '/api/v1/upload',
        data={
            'media_type': 'application/pdf',
            'file': ContentFile('file.pdf', 'invalid pdf content')
        },
        format='upload',
        HTTP_CONTENT_DISPOSITION='attachment; filename="file.pdf"',
    )
    assert r.status_code == 201
    file_id_png = r.data['id']
    resp = token_client.post(
        '/api/v1/organizers/{}/events/{}/ticketlayouts/'.format(env[0].slug, env[0].slug),
        {
            'name': 'Foo',
            'default': False,
            "background": file_id_png,
            'layout': [],
        },
        format='json'
    )
    assert resp.status_code == 201
    tl = env[0].ticket_layouts.get(pk=resp.data["id"])
    assert tl.background