def METHOD_NAME(self):
    # Given
    config = DynatraceConfiguration.objects.create(
        base_url="http://test.com", api_key="api_123", environment=self.environment
    )
    api_key_updated = "new api"
    data = {
        "base_url": "http://test.com",
        "api_key": "new api",
        "entity_selector": "type(APPLICATION),entityName(docs)",
    }
    # When
    url = reverse(
        "api-v1:environments:integrations-dynatrace-detail",
        args=[self.environment.api_key, config.id],
    )
    response = self.client.put(
        url,
        data=json.dumps(data),
        content_type="application/json",
    )
    config.refresh_from_db()
    # Then
    assert response.status_code == status.HTTP_200_OK
    assert config.api_key == api_key_updated