def METHOD_NAME(api):
    '''
    tests the widget update api.
    '''
    responses.add(responses.PATCH,
                  f'{RE_BASE}/dashboards/1/widgets/1',
                  json={'dashboardId': '1',
                        'height': 22,
                        'id': 1,
                        'posX': 11,
                        'posY': 12,
                        'title': 'EDITED',
                        'width': 21
                        }
                  )
    resp = api.widgets.update(dashboard_id='1',
                              widget_id=1,
                              name='EDITED'
                              )
    assert isinstance(resp, dict)
    assert resp['title'] == 'EDITED'
    assert resp['pos_x'] == 11
    assert resp['pos_y'] == 12
    assert resp['width'] == 21
    assert resp['height'] == 22