def METHOD_NAME(db, client, username, password, value_id):
    client.login(username=username, password=password)
    url = reverse(urlnames['detail'], args=[value_id])
    response = client.delete(url)
    if password:
        assert response.status_code == 405
    else:
        assert response.status_code == 401