@mock.patch('airflow.providers.google.cloud.hooks.bigquery.Client')
def test_get_schema(self, mock_client):
    table = {'tableReference': TABLE_REFERENCE_REPR, 'schema': {'fields': [{'name': 'id', 'type': 'STRING', 'mode': 'REQUIRED'}, {'name': 'name', 'type': 'STRING', 'mode': 'NULLABLE'}]}}
    mock_client.return_value.get_table.return_value = Table.from_api_repr(table)
    result = self.hook.get_schema(dataset_id=DATASET_ID, table_id=TABLE_ID)
    mock_client.return_value.get_table.assert_called_once_with(TABLE_REFERENCE)
    assert ('fields' in result)
    assert (len(result['fields']) == 2)
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.Client')
def test_get_schema(self, mock_client):
    table = {'tableReference': TABLE_REFERENCE_REPR, 'schema': {'fields': [{'name': 'id', 'type': 'STRING', 'mode': 'REQUIRED'}, {'name': 'name', 'type': 'STRING', 'mode': 'NULLABLE'}]}}
    mock_client.return_value.get_table.return_value = Table.from_api_repr(table)
    result = self.hook.get_schema(dataset_id=DATASET_ID, table_id=TABLE_ID)
    mock_client.return_value.get_table.assert_called_once_with(TABLE_REFERENCE)
    assert ('fields' in result)
    assert (len(result['fields']) == 2)