Skip to content

Commit 0784018

Browse files
committed
Fixed unit tests
1 parent d452dc4 commit 0784018

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

tests/unittests/test_broken_functions.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,9 @@ async def test_load_broken__invalid_http_trigger_anno(self):
201201

202202
self.assertEqual(
203203
r.response.result.exception.message,
204-
'FunctionLoadError: cannot load the invalid_http_trigger_anno '
205-
'function: \'req\' binding type "httpTrigger" and dataType "0"'
206-
' in function.json do not match the corresponding function'
207-
' parameter\'s Python type annotation "int"')
204+
'FunctionLoadError: cannot load the invalid_http_trigger_anno'
205+
' function: type of req binding in function.json "httpTrigger" '
206+
'does not match its Python annotation "int"')
208207

209208
async def test_load_broken__invalid_out_anno(self):
210209
async with testutils.start_mockhost(
@@ -218,9 +217,8 @@ async def test_load_broken__invalid_out_anno(self):
218217
self.assertEqual(
219218
r.response.result.exception.message,
220219
'FunctionLoadError: cannot load the invalid_out_anno function: '
221-
'\'ret\' binding type "http" and dataType "0" in function.json'
222-
' do not match the corresponding function parameter\'s Python'
223-
' type annotation "HttpRequest"')
220+
r'type of ret binding in function.json "http" '
221+
r'does not match its Python annotation "HttpRequest"')
224222

225223
async def test_load_broken__invalid_in_anno(self):
226224
async with testutils.start_mockhost(
@@ -233,10 +231,9 @@ async def test_load_broken__invalid_in_anno(self):
233231

234232
self.assertEqual(
235233
r.response.result.exception.message,
236-
'FunctionLoadError: cannot load the invalid_in_anno function:'
237-
' \'req\' binding type "httpTrigger" and dataType "0" in '
238-
'function.json do not match the corresponding function '
239-
'parameter\'s Python type annotation "HttpResponse"')
234+
'FunctionLoadError: cannot load the invalid_in_anno function: '
235+
r'type of req binding in function.json "httpTrigger" '
236+
r'does not match its Python annotation "HttpResponse"')
240237

241238
async def test_load_broken__invalid_in_anno_non_type(self):
242239
async with testutils.start_mockhost(

0 commit comments

Comments
 (0)