@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.get_service')
def test_invalid_schema_update_and_write_disposition(self, mock_get_service):
    with pytest.raises(Exception, match="schema_update_options is only allowed if write_disposition is 'WRITE_APPEND' or 'WRITE_TRUNCATE'."):
        self.hook.run_load('test.test', 'test_schema.json', ['test_data.json'], schema_update_options=['ALLOW_FIELD_ADDITION'], write_disposition='WRITE_EMPTY')
@mock.patch('airflow.providers.google.cloud.hooks.bigquery.BigQueryHook.get_service')
def test_invalid_schema_update_and_write_disposition(self, mock_get_service):
    with pytest.raises(Exception, match="schema_update_options is only allowed if write_disposition is 'WRITE_APPEND' or 'WRITE_TRUNCATE'."):
        self.hook.run_load('test.test', 'test_schema.json', ['test_data.json'], schema_update_options=['ALLOW_FIELD_ADDITION'], write_disposition='WRITE_EMPTY')