10000 Used HTTPStatus enum in SkillDialog tests · snifhex/botbuilder-python@3ad17c1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3ad17c1

Browse files
committed
Used HTTPStatus enum in SkillDialog tests
1 parent 65149c5 commit 3ad17c1

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

libraries/botbuilder-dialogs/tests/test_skill_dialog.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright (c) Microsoft Corporation. All rights reserved.
22
# Licensed under the MIT License.
33
import uuid
4+
from http import HTTPStatus
45
from typing import Callable, Union
56
from unittest.mock import Mock
67

@@ -233,9 +234,9 @@ async def test_should_intercept_oauth_cards_for_sso(self):
233234
async def post_return():
234235
nonlocal sequence
235236
if sequence == 0:
236-
result = InvokeResponse(body=first_response, status=200)
237+
result = InvokeResponse(body=first_response, status=HTTPStatus.OK)
237238
else:
238-
result = InvokeResponse(status=200)
239+
result = InvokeResponse(status=HTTPStatus.OK)
239240
sequence += 1
240241
return result
241242

@@ -277,9 +278,9 @@ async def test_should_not_intercept_oauth_cards_for_empty_connection_name(self):
277278
async def post_return():
278279
nonlocal sequence
279280
if sequence == 0:
280-
result = InvokeResponse(body=first_response, status=200)
281+
result = InvokeResponse(body=first_response, status=HTTPStatus.OK)
281282
else:
282-
result = InvokeResponse(status=200)
283+
result = InvokeResponse(status=HTTPStatus.OK)
283284
sequence += 1
284285
return result
285286

@@ -319,9 +320,9 @@ async def test_should_not_intercept_oauth_cards_for_empty_token(self):
319320
async def post_return():
320321
nonlocal sequence
321322
if sequence == 0:
322-
result = InvokeResponse(body=first_response, status=200)
323+
result = InvokeResponse(body=first_response, status=HTTPStatus.OK)
323324
else:
324-
result = InvokeResponse(status=200)
325+
result = InvokeResponse(status=HTTPStatus.OK)
325326
sequence += 1
326327
return result
327328

@@ -360,9 +361,9 @@ async def test_should_not_intercept_oauth_cards_for_token_exception(self):
360361
async def post_return():
361362
nonlocal sequence
362363
if sequence == 0:
363-
result = InvokeResponse(body=first_response, status=200)
364+
result = InvokeResponse(body=first_response, status=HTTPStatus.OK)
364365
else:
365-
result = InvokeResponse(status=200)
366+
result = InvokeResponse(status=HTTPStatus.OK)
366367
sequence += 1
367368
return result
368369

@@ -402,9 +403,9 @@ async def test_should_not_intercept_oauth_cards_for_bad_request(self):
402403
async def post_return():
403404
nonlocal sequence
404405
if sequence == 0:
405-
result = InvokeResponse(body=first_response, status=200)
406+
result = InvokeResponse(body=first_response, status=HTTPStatus.OK)
406407
else:
407-
result = InvokeResponse(status=409)
408+
result = InvokeResponse(status=HTTPStatus.CONFLICT)
408409
sequence += 1
409410
return result
410411

0 commit comments

Comments
 (0)
0