Skip to content

Commit e6486fa

Browse files
committed
Removed testutils from test.decorators
1 parent 09279f3 commit e6486fa

File tree

6 files changed

+15
-16
lines changed

6 files changed

+15
-16
lines changed

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
# AZURE FUNCTIONS TEAM
1010
# For all file changes, github would automatically include the following people in the PRs.
1111
#
12-
* @vrdmr @gavin-aguiar @YunchuWang @pdthummar
12+
* @vrdmr @gavin-aguiar @YunchuWang @pdthummar @hallvictoria

tests/decorators/test_dapr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
DAPR_BINDING_TRIGGER, DAPR_INVOKE, DAPR_PUBLISH, DAPR_SECRET, \
88
DAPR_SERVICE_INVOCATION_TRIGGER, DAPR_STATE, DAPR_TOPIC_TRIGGER
99
from azure.functions.decorators.function_app import FunctionApp
10-
from testutils import assert_json
10+
from tests.testutils import assert_json
1111

1212

1313
class TestDapr(unittest.TestCase):

tests/decorators/test_decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from azure.functions.decorators.function_app import FunctionApp
1313
from azure.functions.decorators.http import HttpTrigger, HttpMethod
1414
from azure.functions.decorators.timer import TimerTrigger
15-
from testutils import assert_json
15+
from tests.testutils import assert_json
1616

1717

1818
class TestFunctionsApp(unittest.TestCase):

tests/decorators/test_function_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
HttpMethod
2020
from azure.functions.decorators.retry_policy import RetryPolicy
2121
from test_core import DummyTrigger
22-
from testutils import assert_json
22+
from tests.testutils import assert_json
2323

2424

2525
class TestFunction(unittest.TestCase):

tests/decorators/testutils.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/testutils.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
import json
12
from typing import List
23

4+
from azure.functions.decorators.utils import StringifyEnumJsonEncoder
5+
36

47
class CollectionBytes:
58
"""The CollectionBytes class is used for generating a mock
@@ -29,3 +32,11 @@ class CollectionSint64:
2932
"""
3033
def __init__(self, data: List[int]):
3134
self.sint64 = data
35+
36+
37+
def assert_json(self, func, expected_dict):
38+
self.assertEqual(json.dumps(json.loads(str(func)), sort_keys=True,
39+
cls=StringifyEnumJsonEncoder),
40+
json.dumps(expected_dict, sort_keys=True,
41+
cls=StringifyEnumJsonEncoder))
42+

0 commit comments

Comments
 (0)