Skip to content

Moved testutils and testutils_lc to test dir #1017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/endtoend/test_blob_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Licensed under the MIT License.
import time

from azure_functions_worker import testutils
from tests.utils import testutils


class TestBlobFunctions(testutils.WebHostTestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/endtoend/test_cosmosdb_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import json
import time

from azure_functions_worker import testutils
from tests.utils import testutils


class TestCosmosDBFunctions(testutils.WebHostTestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/endtoend/test_dependency_isolation_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from unittest.mock import patch

from requests import Response
from azure_functions_worker import testutils
from tests.utils import testutils
from azure_functions_worker.utils.common import is_envvar_true
from azure_functions_worker.constants import PYAZURE_INTEGRATION_TEST

Expand Down
2 changes: 1 addition & 1 deletion tests/endtoend/test_eventgrid_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import requests

from azure_functions_worker import testutils
from tests.utils import testutils


class TestEventGridFunctions(testutils.WebHostTestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/endtoend/test_eventhub_batch_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from datetime import datetime
from dateutil import parser, tz

from azure_functions_worker import testutils
from tests.utils import testutils


class TestEventHubFunctions(testutils.WebHostTestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/endtoend/test_eventhub_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from dateutil import parser, tz

from azure_functions_worker import testutils
from tests.utils import testutils


class TestEventHubFunctions(testutils.WebHostTestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/endtoend/test_http_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import requests

from azure_functions_worker import testutils
from tests.utils import testutils

REQUEST_TIMEOUT_SEC = 5

Expand Down
2 changes: 1 addition & 1 deletion tests/endtoend/test_linux_consumption.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from requests import Request

from azure_functions_worker.testutils_lc import (
from tests.utils.testutils_lc import (
LinuxConsumptionWebHostController
)
from azure_functions_worker.utils.common import is_python_version
Expand Down
2 changes: 1 addition & 1 deletion tests/endtoend/test_queue_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Licensed under the MIT License.
import time

from azure_functions_worker import testutils
from tests.utils import testutils


class TestQueueFunctions(testutils.WebHostTestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/endtoend/test_servicebus_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import json
import time

from azure_functions_worker import testutils
from tests.utils import testutils


class TestServiceBusFunctions(testutils.WebHostTestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/endtoend/test_table_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pathlib
import time

from azure_functions_worker import testutils
from tests.utils import testutils


class TestTableFunctions(testutils.WebHostTestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import shutil
import asyncio

from azure_functions_worker import protos, testutils
from azure_functions_worker import protos
from tests.utils import testutils


async def vertify_nested_namespace_import():
Expand Down
3 changes: 2 additions & 1 deletion tests/unittests/path_import/path_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import shutil
import asyncio

from azure_functions_worker import protos, testutils
from azure_functions_worker import protos
from tests.utils import testutils


async def verify_path_imports():
Expand Down
3 changes: 2 additions & 1 deletion tests/unittests/test_broken_functions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from azure_functions_worker import protos, testutils
from azure_functions_worker import protos
from tests.utils import testutils


class TestMockHost(testutils.AsyncTestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unittests/test_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from typing import Optional, Tuple
from unittest.mock import patch

from azure_functions_worker import protos, testutils
from azure_functions_worker import protos
from tests.utils import testutils
from azure_functions_worker.constants import PYTHON_THREADPOOL_THREAD_COUNT, \
PYTHON_THREADPOOL_THREAD_COUNT_DEFAULT, \
PYTHON_THREADPOOL_THREAD_COUNT_MAX_37, PYTHON_THREADPOOL_THREAD_COUNT_MIN
Expand Down
4 changes: 2 additions & 2 deletions tests/unittests/test_enable_debug_logging_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import os
from unittest.mock import patch

from azure_functions_worker import testutils
from tests.utils import testutils
from azure_functions_worker.constants import PYTHON_ENABLE_DEBUG_LOGGING
from azure_functions_worker.testutils import TESTS_ROOT, remove_path
from tests.utils.testutils import TESTS_ROOT, remove_path

HOST_JSON_TEMPLATE_WITH_LOGLEVEL_INFO = """\
{
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test_file_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import unittest
from unittest import skipIf

from azure_functions_worker import testutils
from tests.utils import testutils
from azure_functions_worker.bindings.shared_memory_data_transfer \
import SharedMemoryException

Expand Down
4 changes: 2 additions & 2 deletions tests/unittests/test_http_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

import pytest

from azure_functions_worker import testutils
from azure_functions_worker.testutils import WebHostTestCase
from tests.utils import testutils
from tests.utils.testutils import WebHostTestCase


class TestHttpFunctions(WebHostTestCase):
Expand Down
4 changes: 2 additions & 2 deletions tests/unittests/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import sys
import textwrap

from azure_functions_worker import testutils
from tests.utils import testutils


class TestLoader(testutils.WebHostTestCase):
Expand Down Expand Up @@ -150,7 +150,7 @@ async def test_entry_point_plugin(self):
code = textwrap.dedent('''
import asyncio
from azure_functions_worker import protos
from azure_functions_worker import testutils
from tests.utils import testutils

async def _runner():
async with testutils.start_mockhost(
Expand Down
4 changes: 2 additions & 2 deletions tests/unittests/test_log_filtering_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Licensed under the MIT License.
import typing

from azure_functions_worker import testutils
from azure_functions_worker.testutils import TESTS_ROOT, remove_path
from tests.utils import testutils
from tests.utils.testutils import TESTS_ROOT, remove_path

HOST_JSON_TEMPLATE_WITH_LOGLEVEL_INFO = """\
{
Expand Down
3 changes: 2 additions & 1 deletion tests/unittests/test_mock_blob_shared_memory_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
import SharedMemoryMap
from azure_functions_worker.bindings.shared_memory_data_transfer \
import SharedMemoryConstants as consts
from azure_functions_worker import protos, testutils
from azure_functions_worker import protos
from tests.utils import testutils


@skipIf(sys.platform == 'darwin', 'MacOS M1 machines do not correctly test the'
Expand Down
3 changes: 2 additions & 1 deletion tests/unittests/test_mock_durable_functions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from azure_functions_worker import protos, testutils
from azure_functions_worker import protos
from tests.utils import testutils


class TestDurableFunctions(testutils.AsyncTestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unittests/test_mock_eventhub_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# Licensed under the MIT License.
import json

from azure_functions_worker import protos, testutils
from azure_functions_worker import protos
from tests.utils import testutils


class TestEventHubMockFunctions(testutils.AsyncTestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unittests/test_mock_generic_functions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from azure_functions_worker import protos, testutils
from azure_functions_worker import protos
from tests.utils import testutils


class TestGenericFunctions(testutils.AsyncTestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unittests/test_mock_http_functions.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from azure_functions_worker import protos, testutils
from azure_functions_worker import protos
from tests.utils import testutils


class TestMockHost(testutils.AsyncTestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unittests/test_mock_log_filtering_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# Licensed under the MIT License.
from unittest.mock import patch, call

from azure_functions_worker import protos, testutils
from azure_functions_worker import protos
from tests.utils import testutils
from azure_functions_worker.logging import is_system_log_category


Expand Down
3 changes: 2 additions & 1 deletion tests/unittests/test_mock_timer_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# Licensed under the MIT License.
import json

from azure_functions_worker import protos, testutils
from azure_functions_worker import protos
from tests.utils import testutils


class TestTimerFunctions(testutils.AsyncTestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unittests/test_rpc_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
import typing
import unittest

from azure_functions_worker import protos, testutils
from azure_functions_worker import protos
from tests.utils import testutils
from azure_functions_worker.utils.common import is_python_version


Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test_shared_memory_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from unittest.mock import patch
from azure_functions_worker.utils.common import is_envvar_true
from azure.functions import meta as bind_meta
from azure_functions_worker import testutils
from tests.utils import testutils
from azure_functions_worker.bindings.shared_memory_data_transfer \
import SharedMemoryManager
from azure_functions_worker.bindings.shared_memory_data_transfer \
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test_shared_memory_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import unittest
from unittest import skipIf

from azure_functions_worker import testutils
from tests.utils import testutils
from azure_functions_worker.bindings.shared_memory_data_transfer \
import SharedMemoryMap
from azure_functions_worker.bindings.shared_memory_data_transfer \
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test_utilities_dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import unittest
from unittest.mock import patch

from azure_functions_worker import testutils
from tests.utils import testutils
from azure_functions_worker.utils.common import is_python_version
from azure_functions_worker.utils.dependency import DependencyManager

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
)
from azure_functions_worker.utils.common import is_envvar_true, get_app_setting

PROJECT_ROOT = pathlib.Path(__file__).parent.parent
PROJECT_ROOT = pathlib.Path(__file__).parent.parent.parent
TESTS_ROOT = PROJECT_ROOT / 'tests'
E2E_TESTS_FOLDER = pathlib.Path('endtoend')
E2E_TESTS_ROOT = TESTS_ROOT / E2E_TESTS_FOLDER
Expand Down
File renamed without changes.