def METHOD_NAME(client, datalayer, map, post_data):
    url = reverse("datalayer_update", args=(map.pk, datalayer.pk))
    client.login(username=map.owner.username, password="123123")
    name = "new name"
    rank = 2
    post_data["name"] = name
    post_data["rank"] = rank
    response = client.post(url, post_data, follow=True)
    assert response.status_code == 200
    modified_datalayer = DataLayer.objects.get(pk=datalayer.pk)
    assert modified_datalayer.name == name
    assert modified_datalayer.rank == rank
    # Test response is a json
    j = json.loads(response.content.decode())
    assert "id" in j
    assert datalayer.pk == j["id"]
    assert j["browsable"] is True
    assert Path(modified_datalayer.geojson.path).exists()