Skip to content

Commit 28e5fdb

Browse files
gavin-aguiarvrdmrGavin Aguiar
authored
Refactoring tests utils (#1109)
* Moved testutils to tests dir * Added logs * Relative import * Changed to absolute import * Testing change * Removed init * Added -m * Removed -m * Updated setup to install utils * Updated setup.py to include tests * Trying relative imports * Skipping flaky test * Pinning fastapi version * Skipped SQL tests * fixing flake8 tests * Fixed linux con tests * Removed 310 tests for dep iso * Fixed flake8 tests * Resolving conflicts * Flake8 fix Co-authored-by: Varad Meru <[email protected]> Co-authored-by: Gavin Aguiar <[email protected]>
1 parent e090dcc commit 28e5fdb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+97
-88
lines changed

azure_functions_worker/constants.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
# Debug Flags
1616
PYAZURE_WEBHOST_DEBUG = "PYAZURE_WEBHOST_DEBUG"
1717

18-
# E2E Integration Flags and Configurations
19-
PYAZURE_INTEGRATION_TEST = "PYAZURE_INTEGRATION_TEST"
20-
PYAZURE_WORKER_DIR = "PYAZURE_WORKER_DIR"
21-
2218
# Platform Environment Variables
2319
AZURE_WEBJOBS_SCRIPT_ROOT = "AzureWebJobsScriptRoot"
2420
CONTAINER_NAME = "CONTAINER_NAME"

tests/common/ping/README.md

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

tests/common/ping/function.json

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

tests/endtoend/test_blob_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Licensed under the MIT License.
33
import time
44

5-
from azure_functions_worker import testutils
5+
from tests.utils import testutils
66

77

88
class TestBlobFunctions(testutils.WebHostTestCase):

tests/endtoend/test_blueprint_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) Microsoft Corporation. All rights reserved.
22
# Licensed under the MIT License.
33

4-
from azure_functions_worker import testutils
4+
from tests.utils import testutils
55

66

77
class TestFunctionInBluePrintOnly(testutils.WebHostTestCase):

tests/endtoend/test_cosmosdb_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import json
44
import time
55

6-
from azure_functions_worker import testutils
6+
from tests.utils import testutils
77

88

99
class TestCosmosDBFunctions(testutils.WebHostTestCase):

tests/endtoend/test_dependency_isolation_functions.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
# Copyright (c) Microsoft Corporation. All rights reserved.
22
# Licensed under the MIT License.
3-
import os
43
import importlib.util
4+
import os
55
from unittest import skip
66
from unittest.case import skipIf
77
from unittest.mock import patch
88

99
from requests import Response
10-
from azure_functions_worker import testutils
10+
1111
from azure_functions_worker.utils.common import is_envvar_true
12-
from azure_functions_worker.constants import PYAZURE_INTEGRATION_TEST
12+
from tests.utils import testutils
13+
from tests.utils.constants import PYAZURE_INTEGRATION_TEST
1314

1415
REQUEST_TIMEOUT_SEC = 5
1516

tests/endtoend/test_durable_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright (c) Microsoft Corporation. All rights reserved.
22
# Licensed under the MIT License.
3-
from azure_functions_worker import testutils
3+
from tests.utils import testutils
44

55

66
class TestDurableFunctions(testutils.WebHostTestCase):

tests/endtoend/test_eventgrid_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import requests
88

9-
from azure_functions_worker import testutils
9+
from tests.utils import testutils
1010

1111

1212
class TestEventGridFunctions(testutils.WebHostTestCase):

tests/endtoend/test_eventhub_batch_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from datetime import datetime
77
from dateutil import parser, tz
88

9-
from azure_functions_worker import testutils
9+
from tests.utils import testutils
1010

1111

1212
class TestEventHubFunctions(testutils.WebHostTestCase):

0 commit comments

Comments
 (0)