Add 'mongo_collection' to template_fields in MongoToS3Operator (#13361)
This commit is contained in:
Родитель
e436883583
Коммит
f7a1334abe
|
@ -38,7 +38,7 @@ class MongoToS3Operator(BaseOperator):
|
|||
to perform transformations unique to those operators needs
|
||||
"""
|
||||
|
||||
template_fields = ['s3_key', 'mongo_query']
|
||||
template_fields = ['s3_key', 'mongo_query', 'mongo_collection']
|
||||
# pylint: disable=too-many-instance-attributes
|
||||
|
||||
@apply_defaults
|
||||
|
|
|
@ -65,7 +65,7 @@ class TestMongoToS3Operator(unittest.TestCase):
|
|||
self.assertEqual(self.mock_operator.s3_key, S3_KEY)
|
||||
|
||||
def test_template_field_overrides(self):
|
||||
self.assertEqual(self.mock_operator.template_fields, ['s3_key', 'mongo_query'])
|
||||
self.assertEqual(self.mock_operator.template_fields, ['s3_key', 'mongo_query', 'mongo_collection'])
|
||||
|
||||
def test_render_template(self):
|
||||
ti = TaskInstance(self.mock_operator, DEFAULT_DATE)
|
||||
|
|
Загрузка…
Ссылка в новой задаче