@mock.patch('airflow.providers.google.cloud.hooks.bigquery.Client')
def test_get_tables_list(self, mock_client):
    table_list = [{'kind': 'bigquery#table', 'id': 'your-project:your_dataset.table1', 'tableReference': {'projectId': 'your-project', 'datasetId': 'your_dataset', 'tableId': 'table1'}, 'type': 'TABLE', 'creationTime': '1565781859261'}, {'kind': 'bigquery#table', 'id': 'your-project:your_dataset.table2', 'tableReference': {'projectId': 'your-project', 'datasetId': 'your_dataset', 'tableId': 'table2'}, 'type': 'TABLE', 'creationTime': '1565782713480'}]
    table_list_response = [Table.from_api_repr(t) for t in table_list]
    mock_client.return_value.list_tables.return_value = table_list_response
    dataset_reference = DatasetReference(PROJECT_ID, DATASET_ID)
    result = self.hook.get_dataset_tables(dataset_id=DATASET_ID, project_id=PROJECT_ID)
    mock_client.return_value.list_tables.assert_called_once_with(dataset=dataset_reference, max_results=None, retry=DEFAULT_RETRY)
    for (res, exp) in zip(result, table_list):
        assert (res['tableId'] == exp['tableReference']['tableId'])
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.Client')
def test_get_tables_list(self, mock_client):
    table_list = [{'kind': 'bigquery#table', 'id': 'your-project:your_dataset.table1', 'tableReference': {'projectId': 'your-project', 'datasetId': 'your_dataset', 'tableId': 'table1'}, 'type': 'TABLE', 'creationTime': '1565781859261'}, {'kind': 'bigquery#table', 'id': 'your-project:your_dataset.table2', 'tableReference': {'projectId': 'your-project', 'datasetId': 'your_dataset', 'tableId': 'table2'}, 'type': 'TABLE', 'creationTime': '1565782713480'}]
    table_list_response = [Table.from_api_repr(t) for t in table_list]
    mock_client.return_value.list_tables.return_value = table_list_response
    dataset_reference = DatasetReference(PROJECT_ID, DATASET_ID)
    result = self.hook.get_dataset_tables(dataset_id=DATASET_ID, project_id=PROJECT_ID)
    mock_client.return_value.list_tables.assert_called_once_with(dataset=dataset_reference, max_results=None, retry=DEFAULT_RETRY)
    for (res, exp) in zip(result, table_list):
        assert (res['tableId'] == exp['tableReference']['tableId'])