def METHOD_NAME(db, client, username, password, project_id, issue_id, status):
    client.login(username=username, password=password)
    issue = Issue.objects.filter(project_id=project_id, id=issue_id).first()
    url = reverse(urlnames['detail'], args=[project_id, issue_id])
    data = {
        'status': status
    }
    response = client.put(url, data, content_type='application/json')
    if issue and project_id in change_issue_permission_map.get(username, []):
        assert response.status_code == 200
        assert response.json().get('status') == status
    elif issue and project_id in view_issue_permission_map.get(username, []):
        assert response.status_code == 403
    else:
        assert response.status_code == 404