Skip to content

Commit 7741617

Browse files
author
Victoria Hall
committed
eventgrid source reference fix
1 parent 4307c75 commit 7741617

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

azure/functions/decorators/blob.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self,
1717
**kwargs):
1818
self.path = path
1919
self.connection = connection
20-
self.source = source
20+
self.source = source.value if source else source
2121
super().__init__(name=name, data_type=data_type)
2222

2323
@staticmethod

tests/decorators/test_blob.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def test_blob_trigger_creation_with_default_specified_source(self):
4242
"name": "req",
4343
"dataType": DataType.UNDEFINED,
4444
"path": "dummy_path",
45-
'source': BlobSource.LOGS_AND_CONTAINER_SCAN,
45+
'source': 'LogsAndContainerScan',
4646
"connection": "dummy_connection"
4747
})
4848

@@ -62,7 +62,7 @@ def test_blob_trigger_creation_with_source_as_string(self):
6262
"name": "req",
6363
"dataType": DataType.UNDEFINED,
6464
"path": "dummy_path",
65-
'source': BlobSource.EVENT_GRID,
65+
'source': 'EventGrid',
6666
"connection": "dummy_connection"
6767
})
6868

@@ -82,7 +82,7 @@ def test_blob_trigger_creation_with_source_as_enum(self):
8282
"name": "req",
8383
"dataType": DataType.UNDEFINED,
8484
"path": "dummy_path",
85-
'source': BlobSource.EVENT_GRID,
85+
'source': 'EventGrid',
8686
"connection": "dummy_connection"
8787
})
8888

0 commit comments

Comments
 (0)