@mock.patch('airflow.providers.google.cloud.hooks.bigquery.Dataset')
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.Client')
def test_update_dataset(self, mock_client, mock_dataset):
    dataset_resource = {'kind': 'bigquery#dataset', 'location': 'US', 'id': 'your-project:dataset_2_test', 'datasetReference': {'projectId': 'your-project', 'datasetId': 'dataset_2_test'}}
    method = mock_client.return_value.update_dataset
    dataset = Dataset.from_api_repr(dataset_resource)
    mock_dataset.from_api_repr.return_value = dataset
    method.return_value = dataset
    result = self.hook.update_dataset(dataset_id=DATASET_ID, project_id=PROJECT_ID, dataset_resource=dataset_resource, fields=['location'])
    mock_dataset.from_api_repr.assert_called_once_with(dataset_resource)
    method.assert_called_once_with(dataset=dataset, fields=['location'], retry=DEFAULT_RETRY)
    assert (result == dataset)
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.Dataset')
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.Client')
def test_update_dataset(self, mock_client, mock_dataset):
    dataset_resource = {'kind': 'bigquery#dataset', 'location': 'US', 'id': 'your-project:dataset_2_test', 'datasetReference': {'projectId': 'your-project', 'datasetId': 'dataset_2_test'}}
    method = mock_client.return_value.update_dataset
    dataset = Dataset.from_api_repr(dataset_resource)
    mock_dataset.from_api_repr.return_value = dataset
    method.return_value = dataset
    result = self.hook.update_dataset(dataset_id=DATASET_ID, project_id=PROJECT_ID, dataset_resource=dataset_resource, fields=['location'])
    mock_dataset.from_api_repr.assert_called_once_with(dataset_resource)
    method.assert_called_once_with(dataset=dataset, fields=['location'], retry=DEFAULT_RETRY)
    assert (result == dataset)