import json


def input_data(client, headers):
    """Input data (as coming from the view layer)."""
    data = {
        "metadata": {"title": "Test"},
    }
    res = client.post("/mocks", headers=headers, data=json.dumps(data))
    assert res.status_code == 201
    return res.json